crystal v0.7.0 Release Notes
Release Date: 2015-04-30 // almost 9 years ago-
- 0๏ธโฃ Crystal has evented IO by default. Added
spawn
andChannel
. - ๐ Correctly support the X86_64 and X86 ABIs. Now bindings to C APIs that pass and return structs works perfectly fine.
- โ Added
crystal init
to quickly create a skeleton library or application (thanks @waterlink) - โ Added
--emit
flag to the compiler. Now you can easily see the generated LLVM IR, LLVM bitcode, assembly and object files. - โ Added
--no-color
flag to suppress color output, useful for editor tools. - โ Added macro vars:
%var
and%var{x, y}
create uniquely named variables inside macros. - โ Added typed splats.
- โ Added
Iterator
and many methods that return iterators, likeArray#each
,Hash#each
,Int#times
,Int#step
,String#each_char
, etc. - โ Added
sprintf
and improvedString#%
to support floats and float formatting. - โ Added more variants of
String#gsub
. - โ Added
Pointer#clear
and use it to clear anArray
's values when doingpop
and other shrinking methods. - โ Added
BigInt#to_s(base)
,BigInt::cast
and bit operators (thanks @Exilor) - ๐ Allow invoking methods on a union class as long as all types in the union have it.
- ๐ Allow specifying a def's return type. The compiler checks the return type only for that def for now (not for subclasses overriding the method). The return type appears in the documentation.
- ๐ Allow constants and computed constants for a StaticArray length.
- ๐ Allow class vars in enums.
- ๐ Allow private and protected defs in enums.
- ๐ Allow reopening a
lib
and adding more@[Link]
attributes to it, even allowing duplicated attributes. - ๐ Allow getting a function pointer to a lib fun without specifying its types (i.e.
->LibC.getenv
) - ๐ Allow specifying
ditto
for a doc comment to reuse the previous comment. - ๐ Changed the semantic of
%
: previously it meantremainder
, not it meansmodulo
, similar to Ruby and Python. AddedInt#remainder
. #to_s
and#inspect
now work for a union class.- Spec: added global
before_each
andafter_each
hooks, which will simplify the use of mocking libraries like timecop.cr and webmock.cr. Range(T)
is nowRange(B, E)
again (much more flexible).- ๐ Improved Regex performance.
- ๐ Better XML support.
- ๐ Support LLVM 3.6.
- ๐ป Exception class is now shown on unhandled exceptions
- The following types are now disallowed in generics (for now): Object, Value, Reference, Number, Int and Float.
- ๐ Lots of bug fixes, enhancements and optimizations.
- 0๏ธโฃ Crystal has evented IO by default. Added