タグ

staticに関するincepのブックマーク (3)

  • What does "static" mean in C?

    I've seen the word static used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)?

    What does "static" mean in C?
    incep
    incep 2019/10/02
    すごく勉強になるSOの一つ.C++,C#でのstaticキーワードにも言及してるので情報量が多い
  • 【C#】staticクラスとシングルトン考察 - PG日誌

    C# には言語固有機能として static クラスという機能があります。クラス自体を static と宣言することで、インスタンス作成を禁止し、static 宣言したクラスのインスタンスが複数作成できないようにできます。ですがこの機能、デザインパターンにあるシングルトンと何か違うのでしょうか?ちょっと考察してみました。 まずは、static クラスと Singleton 各々が C# 言語上でどういう風に表現されるか見ていきたいと思います。 staticクラスの宣言 static クラスの宣言方法は簡単で、クラスの前に static を付けます。 // 宣言に「static」を追加 public static class GlobalDataByStaticClass ... こうすることによってこのクラスの新規作成、インスタンスメンバーの保持を禁止することができます。 public st

    【C#】staticクラスとシングルトン考察 - PG日誌
    incep
    incep 2018/07/10
    "staticクラスの場合、ほぼ一瞬で実装が完了するので大変軽いのですが、C言語時代にあったグローバル変数と同じで、派生クラスによる差し替えもできないため実装がシングルトンに比べ固くなります。"
  • Stan

    Stan is a state-of-the-art platform for statistical modeling and high-performance statistical computation. Many thousands of users rely on Stan for statistical modeling, data analysis, and prediction in the social, biological, and physical sciences, engineering, and business. Stan interfaces with the most popular data analysis languages (R, Python, shell, MATLAB, Julia, Stata) and runs on all majo

    Stan
  • 1