作者から辿るLINQの源泉
Erik Meijer
Head in the box @Channel9
http://en.wikipedia.org/wiki/Erik_Meijer_(computer_scientist)
http://research.microsoft.com/en-us/um/people/emeijer/ErikMeijer.html
Microsoft Research, Microsoft(Cloud Programmability Team)
つい最近独立
Applied Duality
http://www.applied-duality.com/
Haskellとの関わり(-2000)
Haskell 98策定者の一人
Programming in Haskellの動画解説とかも
http://www.cs.nott.ac.uk/~gmh/book.html
Parsec: A practical parser library
Daan Leijen, Erik Meijer
http://research.microsoft.com/en-us/um/people/emeijer/papers/parsec.pdf
LINQはMonad?このバックグラウ
ンドならそりゃそうだよね
SQL-based Operators
クエリ構文みたいな何か
この時はまだ相当SQLそのものな構文だったよう
// 語順は完全にSQLそのまま、ただし当然タイプセーフ
struct { string Title; string Artist;}* results =
select Title, Artist from CDs where Style == CDStyle.HipHop;
results.{ Console.WriteLine("Title = {0}, Artist = {1}", it.Title, it.Artist); };
// update, insert, transactionなども用意されていた
int n = update DB.Customers
set City = "London"
where Country == "UK" && City == "Landon";
XML Literals
C#にはないけど
VB.NETにはこれそのものじゃないけどある
// こんな定義で
public class NewsItem{
attribute string title;
attribute string author;
struct { DateTime date; string body; }
}
// こんな風にリテラル直打ちで
NewsItem news = <NewsItem title="Hello World" author="Dare Obasanjo">
<date>{DateTime.Now}</date>
<body>I am the first post of the New Year.</body>
</NewsItem>;
Console.WriteLine(news.title + " by " + news.author + " on " + news.date);
C# 3.0(2008-)
Language Extensions for LINQ
Type Inference
Anonymous Type
Lambda Expressions
Expression Trees
Query Syntax
Extension Methods キーワード並べただけなのは手
抜きなのではないか疑惑
to JavaScript/Java/Dart/etc…
linq.js
LINQ to ObjectsのJavaScript移植
TypeScriptのジェネリクス対応で更に強く!
Java - EL Collection Operations
EL 3.0 uses LINQ
https://java.net/projects/el-spec/pages/CollectionOperations
RxJS/RxJava/Rx…
Reactive Extensions for many laguages
Dart Streams API
We have learned a lot by looking at .Net’s RX
http://news.dartlang.org/2012/11/introducing-new-streams-api.html
LINQはどこでも使える!普遍!