頗具內涵的Red語言Logo
Red是一種可以運行於多種平台的全棧語言,它的語法主要繼承於Rebol,同時在設計過程中借鑒了Scala和Lua的優點 。作為一門全棧語言,Red既可以用於高層級的編程,如DSL(Domain Specific Language),也可用於低層級的編程,如設備驅動。
更多詳情請看這篇文章:《Red語言:向編程復雜性反擊》
Red 0.5.4版本是一次重大的更新,帶來了大量的新特性。接下來他將支持GUI,也可能會支持DSL。
圖為:Red Language architecture schema
關於編程語言Red請參見百科:百度和維基。
Red開始支持了一些新的datatype,包括:Pair! datatype、Percent! datatype、Tuple! datatype、Map! datatype等。
同時,它也支持了Set操作,主要有:
- union: returns the union of two data sets.
- exclude: returns the first data set less the second data set.
- intersect: returns the intersection of two data sets.
- difference: returns all the values which differ from two data sets.
- unique: returns the data set with duplicates removed.
而這些操作可以應用於這些datatypes:block!、string!、bitset!、typeset!。(注:會在下一個版本中支持 Hash! datatype)
New natives:as-pair、break、continue、extend。
New action:put。(注:PUT僅支持在map!中實現,其它的支持請靜候未來版本)
New function:cause-error
Red/System additions:
添加New natives是為了更好地支持新的Red功能:
其它更新:
- exit/return are now defined as natives instead of volatile keywords.
- do can accept error! values.
- parse and load are now more stable when errors are raised from parsing rules.
- load errors handling greatly improved (no console exit on syntax errors anymore).
- value? now supports any type, except unset! as argument.
- fixed bugs and little improvement of help output.
- minor Redbin speed and generated payload size improvement.
- prin output in console fixed.
- fixed Red/System's #get directive not working in some cases.
- system/words now defined as an object!.
- compiler now supports system/words/ prefix to access global context words.
- many fixes and improvements on vector! datatype, especially on math operations.
- color definitions are now available.
- vector! unit tests significantly extended.
- an op! used without arguments in the interpreter now reports an error.
- pick and poke now accept a logic! value as index.
- added missing comparison operators for vector!.
- paths evaluation errors in interpreter are now more accurate.
- first memory frame allocation increased from 512KB to 1MB.
- fixed memory corruptions caused by function with refinements in interpreter.
- division by zero now properly caught for floats.
- last but not least, 44 bugs reported on Github's tracker fixed in this release!
項目遷移至Gitter
Red團隊認為Gitter雖然年輕,但前途不可限量,所以已經將項目遷移至了Gitter,用GitHub賬戶也可直接登錄,你可以去這裡和他們溝通交流:https://gitter.im/red/red
下一步
這次發布標志著在master重新集成Android分支的開始。另外,Red團隊稱將在0.6.0中支持GUI引擎和GUI DSL,不過Android back-end不在下個版本的計劃中。此外,由於Android的開發周期很慢和調試選項的限制,所以Windows會成為GUI的第一個支持平台,可 快速完成引擎和DSL。最後,在0.6.1中將會合並Android GUI back-end和toolchain。
下載地址:http://www.red-lang.org/p/download.html
發布日志:http://www.red-lang.org/2015/06/054-new-datatypes-exceptions-and-set.html
HN的討論:https://news.ycombinator.com/item?id=9714679