オラクルのJava言語アーキテクトであるBrian Goetz氏と、オラクルのプログラミング言語研究者であるGavin Bierman氏の2人はJavaプログラミング言語への統合を見込んだパターンマッチの構想についてInfoQに述べた。 動機 この研究の動機は、いくつかの一般的なJavaプログラミングのイディオムを改善することだ。以下のことを考えてみよう。 if (obj instanceof Integer) { int intValue = ((Integer) obj).intValue(); // use intValue } 動作中3つの操作がある。 objがInteger型かどうかを特定するための検査 objをInteger型にキャストする変換 Integerからintを取り出す分解操作 次にif...else構造にある他のデータ型に対して検査することを考えてみよう。 Stri
If all goes according to plan (Project Jigsaw we’re looking at you), Java 9 is set to launch in less than 100 days. You can join the countdown to its release right here. It will come packed with a long list of new and upgraded features, some we can’t wait to see in action. However, there are a few features that weren’t ready for Java 9, and that’s where Project Amber comes in, so these features co
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く