ceylon 1.1 已經開發6個月了,是時候給大家交待一下開發的進度了。這在 6 個月内我們處理并關閉了超過 650 個 issue,關于編譯器和語言子產品方面,其中 ide 方面的問題有 300 個。
目前 ceylon 1.1 優先級最高的是:
語言子產品 api 的最終确認
清理和最小化使用 java 和 javascript 代碼
處理影響 java 互操作的遺留問題
性能提升
ide 建構的性能
當然,也包括很多 bug 修複。
語言方面的變化
語言方面的變化比較少,基本上 1.0 後我們認為比較穩定,而 1.1 主要新特性有::
支援 use-site variance.
因為 byte 類專門為 jvm 的編譯器中的 byte 優化
其他值得關注的變化:
allow comprehensions to begin with anifclause.
newsealedannotation to prevent extension or instantiation of a type outside the module in which it is defined.
introduction ofdynamicinterfaces, designed for wrapping native javascript apis.
redefined-operator to work for anyinvertible.
allow metamodel references toobjects and members ofobjects.
try (x)was changed to distinguish between the lifecycles ofobtainableanddestroyableresources.
the type of the expression{}is now{nothing*}instead of[].
allow refinement of multiple overloaded versions of a java supertype method.
added ability tocatchinstances ofthrowable.
最後兩項變化比較大,但多數程式不受影響。
語言子產品的變化
在 1.1 中我們引入很多思想和開發的效果在語言子產品上,并非常小心的評審這些設計和範圍,降低原生代碼的使用、優化性能等等。
是以語言子產品包含很多不相容以前的變化,這些都會影響到現有的程式。但 1.1 之後就會穩定下來,不會再有大變化。
addition of a raft of new methods and functions for working with streams.
optimization of the performance ofarray, along with some minor improvements to interop with java native arrays.
removal of thecloneableinterface, and addition of aclone()method tocollection.
addition ofthrowable.
replacement ofcloseablewithobtainableanddestroyable.
minor changes to the operations ofiterable,list, andmap.
arraysequenceis nowsealedand may be instantiated via thesequence()function.
substantial redesign ofenumerableandrange.
several changes to the type hierarchy for numeric types.
removal ofsequencebuilderand move ofstringbuildertoceylon.collection.
removal oflazylist,lazysetandlazymap`.
modularity
主要是提升易用性
ceylon.cararchives now include automatically generated osgi and maven metadata, and can execute in an osgi container.
new api for cross-platform resource loading.
support for deploying ceylon modules to vert.x.
sdk
主要包括:
introduction ofceylon.locale,ceylon.logging, andceylon.promise.
many enhancements toceylon.collection, including addition ofarraylist,treeset,treemap, andpriorityqueueclasses, along withstackandqueueinterfaces.
various improvements toceylon.dbc.
many improvements toceylon.test.
目前 collections 子產品已經穩定。
ide
ide 的開發非常活躍,包含很多新特性和性能的提升:
complete rework of build process, for much improved performance.
new refactorings: move out, make receiver, move to unit, extract parameter, collect parameters, invert boolean, safe delete.
major enhancements to the change parameters refactoring.
inline refactoring now works for shared class/interface members.
brand new high quality code formatter.
rewritten ceylon explorer with much better presentation of modules and modular dependencies.
new navigation actions: open in type hierarchy view, go to refined declaration.
popup quick find references and recently edited files.
graphical visualize modular dependencies.
further integration of "linked mode" with refactorings and quick assists.
useful format block source action.
auto-escape special characters when pasting into string literals.
synchronization of all keyboard accelerators with jdt equivalents (by popular request).
save actions in ceylon editor preferences.
intellij-style "chain completion" (hit ctrl-space twice).
propose toplevel functions applying to a type alongside members of the type.
several new options for customizing autocompletion and appearance in ceylon editor preferences.
new quick fixes/assists: convert between string interpolation and concatenation, convert to/from verbatim string, add satisfied interfaces, add type parameter, change named argument list to positional, fill in argument names, export module, convert to verbose form refinement, print expression, fix refining method signature, change toif (exists), change module version, assign tofor/try/if (exists)/if (nonempty)/if (is).
run as ceylon test on node.js.
new default color scheme for syntax highlighting and many other aesthetic improvements.