颇具内涵的Red语言Logo
Red是一种可以运行于多种平台的全栈语言,它的语法主要继承于Rebol,同时在设计过程中借鉴了Scala和Lua的优点 。作为一门全栈语言,Red既可以用于高层级的编程,如DSL(Domain Specific Language),也可用于低层级的编程,如设备驱动。
Red 0.5.4版本是一次重大的更新,带来了大量的新特性。接下来他将支持GUI,也可能会支持DSL。
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账户也可直接登录。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责,本站只提供参考并不构成任何投资及应用建议。本站是一个个人学习交流的平台,网站上部分文章为转载,并不用于任何商业目的,我们已经尽可能的对作者和来源进行了通告,但是能力有限或疏忽,造成漏登,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。