❏ 站外平台:

编程语言Red 0.5.4发布:新datatypes、异常处理和set操作

| 2015-06-16 09:03   收藏: 1    

https://img.linux.net.cn/data/attachment/album/201506/16/090305hfgnfr0r0lnm6fzf.png

颇具内涵的Red语言Logo

Red是一种可以运行于多种平台的全栈语言,它的语法主要继承于Rebol,同时在设计过程中借鉴了Scala和Lua的优点 。作为一门全栈语言,Red既可以用于高层级的编程,如DSL(Domain Specific Language),也可用于低层级的编程,如设备驱动。

更多详情请看这篇文章:《Red语言:向编程复杂性反击》


Red 0.5.4版本是一次重大的更新,带来了大量的新特性。接下来他将支持GUI,也可能会支持DSL。

https://img.linux.net.cn/data/attachment/album/201506/16/090305mmsmc59ibk9kmm1b.png

图为: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)

新的语句:as-pair、break、continue、extend。

新的动作:put。(注:PUT仅支持在map!中实现,其它的支持请静候未来版本)

新的函数:cause-error

其它更新

  • 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



最新评论


返回顶部

分享到微信

打开微信,点击顶部的“╋”,
使用“扫一扫”将网页分享至微信。