CodeZine編集部では、現場で活躍するデベロッパーをスターにするためのカンファレンス「Developers Summit」や、エンジニアの生きざまをブーストするためのイベント「Developers Boost」など、さまざまなカンファレンスを企画・運営しています。

Javaは、企業のITシステムの開発になくてはならないプログラミング言語としての地位を確立している。一方で、PythonやJavaScriptといった若い世代に人気がある言語と比較すると、煩雑な記法が多く堅苦しいイメージは否めない。 こうしたイメージを一新してJavaの生産性を高める試みが「Project Amber(プロジェクト・アンバー)」だ。同プロジェクトではこれまで、Javaプログラムの可読性を高めるために数々の記法の改良を行ってきた。 その成果の1つとして、2023年秋に公開予定の「JDK(Java Development Kit) 21」に導入されるのが、Javaプログラムの実行の起点である「mainメソッド」の大幅な簡略化だ。Javaの新機能は「JEP(JDK拡張提案)」として管理されており、mainメソッドの簡略化は「JEP 445」で規定されている。 Javaの開発にかか
Linux Daily Topics フリーローダーを歓迎する ―CIQ、Oracle、SUSEがRed Hat対抗の新団体「OpenELA」を設立 CIQ(Rocky Linuxの開発元)、Oracle、SUSEは8月10日、「Red Hat Enterprise Linux」と互換性のあるLinuxディストリビューションの開発を促進する団体「Open Enterprise Linux Association(OpenELA)」の設立を発表した。3社は今後、RHEL7/8/9と互換性のあるダウンストリームの開発にフォーカスし、コミュニティ参加者がOpenELAソースに継続的にアクセスできる環境を提供していくことを謳っている。 CIQ, Oracle and SUSE Create Open Enterprise Linux Association for a Colla
HashiCorpは2023年8月10日(米国時間)、Terraformをはじめとした同社の製品のライセンスを 「Mozilla Public License v2.0(MPL 2.0)」 から「Business Source License v1.1(以下、BSL)」に移行すると発表した。BSLは定義上オープンソースソフトウェアライセンスではない。このため、「オープンソース版」あるいは「OSS版」と呼ばれていたものは「コミュニティー版」と名称が変わった。 HashiCorpはさまざまな専門家やステークホルダーとの協議の上で、今回のライセンス変更に至ったという。 BSLはMariaDBが公開したライセンスモデルで、他にもCouchbaseやCockroach Labsなどが採用している。その内容は多くの点で、 Open Source Initiativeによるオープンソースソフトウェアの定
お気の毒に・・。 www.nikkei.com スパゲティコードになるプロセスはよーくわかる。 仕様変更に次ぐ仕様変更、当初の想定が間違っていたことのフォローアップ、一つ一つ丁寧に進めていきつつ、当初の見積工数を超えないようにこれまでの成果物をできるだけ活かしたら、最終的にできるのはスパゲティーになる。 スパゲティーを作る人が悪いんじゃなくて、オーダーした人がスパゲティーを望んだからだとしか言いようがない。スパゲティーを作って欲しいと言っている人に、スパゲティー以外を料理する方法が思いつかない。麺類なら許されるのか?。 大企業のプロジェクト運用体制に、1つ起因する問題もある。長期に運用するシステムの場合、同じ担当者がずっと担当し続けることが難しいことだ。人が入れ替わる前提だと、毎回引き継ぎのタイミングで過去の情報を振り返らないといけない。この時ほぼ情報は抜け漏れる。どんなに優秀な人が担当し
KDDI、KDDI総合研究所、富士通、NEC、三菱総合研究所は2023年8月1日、5G(第5世代移動通信システム)やLTEネットワーク機器などを対象例とした通信分野におけるSBOM(Software Bill of Materials)導入に向けた実証事業を開始すると発表した。SBOMは特定の製品に含まれるすべてのソフトウエアコンポーネント、ライセンス、依存を一覧化したもので「ソフトウエア部品表」とも呼ばれる。 KDDIが総務省から「通信分野におけるSBOMの導入に向けた調査の請負」を受託したことを受けて取り組むもので、通信分野におけるサイバーセキュリティー強化を目的とする。実証ではSBOMを使ってソフトウエア・サプライチェーンを把握し、脆弱性などへの迅速な対応を実現するとしている。各社の役割分担としては、三菱総合研究所が国内外の動向調査や通信分野へのSBOM導入に向けたガイドライン案を検
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
名前空間の使用法: エイリアス/インポート (PHP 5 >= 5.3.0, PHP 7, PHP 8) 外部の完全修飾名をエイリアスで参照したりインポートしたりする機能は、 名前空間において非常に重要なものです。 これは、Unix 系のファイルシステムでファイルやディレクトリへのシンボリックリンクを作成することに似ています。 PHP は定数、関数、クラス、インターフェイス、トレイト、列挙型(Enum)、名前空間のエイリアスやインポートをサポートしています。 エイリアス作成には use 演算子を使用します。 ここに、5 種類すべてのインポート方法の例を示します。 <?php namespace foo; use My\Full\Classname as Another; // これは use My\Full\NSname as NSname と同じです use My\Full\NSname
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
<?php //single or double quotes with single or double backslash in dynamic namespace class. namespace Country_Name{ class Mexico{ function __construct(){ echo __METHOD__,"<br>"; } } $a = 'Country_Name\Mexico';//Country_Name\Mexico::__construct $a = "Country_Name\Mexico"; //Country_Name\Mexico::__construct $a = '\Country_Name\Mexico'; //Country_Name\Mexico::__construct $a = "\Country_Name\Mexico";
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
共変性と反変性 PHP 7.2.0 で、子クラスのメソッドの引数の型の制限を除く形で、反変性が一部サポートされました。 PHP 7.4.0 以降で、共変性と反変性が完全にサポートされるようになりました。 共変性とは、子クラスのメソッドが、親クラスの戻り値よりも、より特定の、狭い型を返すことを許すことです。 反変性とは、親クラスのものよりも、より抽象的な、広い型を引数に指定することを許すものです。 型宣言は以下の場合に、より特定の、狭い型であると見なされます: union 型 から、特定の型が削除されている場合 特定の型が 交差型 に追加されている場合 クラスの型が、子クラスの型に変更されている場合 iterable が 配列 または Traversable に変更されている場合 上記と反対のことが当てはまる場合は、より抽象的な、広い型であると見なされます。 <?php abstract c
オブジェクトのシリアライズ - セッション内でのオブジェクト serialize() は、 PHP で保存できるあらゆる値をバイトストリームで表した文字列を返します。 unserialize() を使うと、 この文字列から元の変数の値を取り出すことができます。 オブジェクトをシリアライズすると、オブジェクト内の変数もすべて保存されます。 オブジェクト内のメソッドは保存されません。 クラス名のみが保存されます。 オブジェクトを unserialize() するには、 そのオブジェクトのクラスが定義されている必要があります。 A クラスのオブジェクトをシリアライズしたのなら、 その文字列にはクラス A とその中のすべての変数の値が含まれています。 別のファイルでそれを復元してクラス A のオブジェクトを取り出すには、 まずそのファイル内にクラス A の定義が存在しなければなりません。 これを実
Notes on reference: A reference is not a pointer. However, an object handle IS a pointer. Example: <?php class Foo { private static $used; private $id; public function __construct() { $id = $used++; } public function __clone() { $id = $used++; } } $a = new Foo; // $a is a pointer pointing to Foo object 0 $b = $a; // $b is a pointer pointing to Foo object 0, however, $b is a copy of $a $c = &$a; //
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
オブジェクトの比較 比較演算子(==)を使用する際、 オブジェクト変数は、単純に比較されます。つまり、 二つのオブジェクトのインスタンスは、 同じ属性と値 (値の比較は == によるもの) を有し、同じクラスのインスタンスである場合に、 等しいとされます。 一致演算子(===)を使用する場合、 オブジェクト変数は、同じクラスの同じインスタンスを参照する場合のみ、 等しいとされます。 これらのルールを明確に示す例を以下に示します。 <?php function bool2str($bool) { if ($bool === false) { return 'FALSE'; } else { return 'TRUE'; } } function compareObjects(&$o1, &$o2) { echo 'o1 == o2 : ' . bool2str($o1 == $o2) . "
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く