crystal v0.7.0 Release Notes

Release Date: 2015-04-30 // almost 9 years ago
    • 0๏ธโƒฃ Crystal has evented IO by default. Added spawn and Channel.
    • ๐Ÿ‘ 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, like Array#each, Hash#each, Int#times, Int#step, String#each_char, etc.
    • โž• Added sprintf and improved String#% to support floats and float formatting.
    • โž• Added more variants of String#gsub.
    • โž• Added Pointer#clear and use it to clear an Array's values when doing pop 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 meant remainder, not it means modulo, similar to Ruby and Python. Added Int#remainder.
    • #to_s and #inspect now work for a union class.
    • Spec: added global before_each and after_each hooks, which will simplify the use of mocking libraries like timecop.cr and webmock.cr.
    • Range(T) is now Range(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.