日曜日, 5月 25, 2008

「JavaOne 2008レポート」見えてきたJava SE 7

Javaの新しいバージョン、Java SE 7 が議論されているとか。

つまんない変更を加えて、そんなことよりも仮想マシンの普及に力を入れて欲しい、とわりに深刻に悩む毎日なわけですが、「モジュール」、「プロファイル」が導入されるというニュース。

オブジェクト指向言語では、C言語で言う構造体を、「カプセル化」しており、クラス構造体のメンバ変数へのアクセス権を指定できます。Javaでは、さらにクラスをまとめた「パッケージ」を指定し、DLLのように扱うことが可能です。「モジュール」では、複数のパッケージをまとめ、アクセス権を定義するということらしい。「プロファイル」とは、rt.jar のサブセットだそうです。「言語仕様・管理」については、例外の複数指定、javadocの形式変更・追加、ファイルIOの強化、JMXその他野心的な改変が語られているらしい。

「JavaOne 2008レポート」見えてきたJava SE 7 (2008-5-24)

It took me some time before I realize that the package private is the default setting of all the Java variables and methods when they are set within a class. The modifiers are only public and private and the possibilities of module thing coming in the next version of SDK, I was to reaffirm what those are. The Java tutorials used to write something like the default being public. Yeah, I am sure of that.

PHP: 定数を扱う

プロジェクトごとの定数を扱うクラス Config\Constants の紹介です。 <?php namespace Config; class Constants {     public const DB_USER = "linguist...