MILL:在 C 裡面實作 Go-style 的 concurrency

看到「Go-style concurrency in C」這個專案,在 C 上實作 Go-style 的 concurrency,包括了 channel 的設計。原始程式碼可以在 GitHub 上的「sustrik/mill」看到。

在「mill.c」可以看到實作細節,另外也可以看到 yield() 的設計。

不過目前還很早期,請小心服用:

This is a proof of concept project that seems to work with x86-64, gcc and Linux. I have no idea about different environments. Also, the project is in very early stage of development and not suitable for actual usage.

PHP 5.5 的改善...

因為 PHP 5.5.0 Alpha1 在十一月放出來,國外論壇上也陸陸續續都開始在討論 PHP 5.5 的文章,像是這篇列出了 PHP 5.5 的新功能:「What to Expect From PHP 5.5」。

目前看起來,PHP 5.5 導入 Generators 與 yield,可以讓 iterator 的行為寫得更自然,以前要自己得用 class 包起來模擬...

不過,可以直接寫 "Hello World"[1] 得到 "e" 究竟會讓 PHP community 產生出來的 code 變成什麼樣子呢...