Crystal 0.33.0 release: Combining elements of Ruby and C

Share
  • February 19, 2020

We highlighted the Crystal programming language before on JAXenter and have been keeping an eye on its new releases. Here’s the scoop: it takes inspiration from the best of multiple programming languages, by combining the syntax structure of Ruby plus the efficiency and speed of C.

This means that Ruby programmers will quickly gain a foothold and find Crystal easy to write with. So if you are looking to pick up a new language, the hidden gem might be right here. Check out the language overview and see how it compares.

The latest version, 0.33.0, arrived on February 14, 2020. This Valentine’s Day update added some changes to the language and the standard library.

SEE ALSO: Coding bootcamps & YouTube: Developers in 2020 learn via non-traditional methods

New updates in 0.33.0

Version 0.33.0 is the result of 117 commits and the work of 29 contributors. Let’s take a look at some of the new additions:

  • Language change: added select/timeout language construct for select statements
  • Breaking changes: removed previously deprecated methods and modules
  • Macros: extended TypeNode#name with a new overload
  • Compiler fixes: fixed memory corruption bugs and cleaned up previously deprecated comma separators
  • Standard library change: added Object#in?
  • Numerics: added BigInt#unsafe_shrand refactoredFloat#fdiv
  • Files: Deprecated File::Info#owner, and File::Info#groupfor #owner_id, and #group_id.
  • Networking: improved OpenSSL::SSL::Socket
  • Windows improvement: added Windows CI using GitHub Actions
  • Linux change: using lld instead of ld
  • Doc generator: deprecate ditto and nodoc in favor of :ditto: and :nodoc:.
  • Serialization: improved JSON deserialization for better union types
crystal

Newly added select/timeout language construct. Source.

That’s not all; check out the changelog for the complete overview for all the changes and bug fixes.

Future plans

Where to now? For one, the language is still under heavy development, with possible breaking changes to come as it becomes more mature and reaches its goals. It is currently not production-ready yet but is well on its way.

Crystal’s design goals from its README include:

  • Have a syntax similar to Ruby (but compatibility with it is not a goal)
  • Statically type-checked but without having to specify the type of variables or method arguments.
  • Be able to call C code by writing bindings to it in Crystal.
  • Have compile-time evaluation and generation of code, to avoid boilerplate code.
  • Compile to efficient native code.

According to the announcement blog, the next update, version 0.34, will most likely include updated shards. Like all updates, if you test out version 0.33.0, be sure to offer some feedback and help improve future versions. In preparation, the dev team asks if users could test shards against Crystal nightly releases.

From the blog:

It will also be helpful if your shards are tested against Crystal nightly releases. Either Docker or Snap are the current channels to get them easily. This will help reduce the friction of a release while checking if the ecosystem is in good shape.

SEE ALSO: Architectural Patterns in the Serverless Journey of shop.LEGO.com

Installing Crystal

Want to test Crystal out? The in-browser online playground is a good place to start compiling and running your own code. (However, as of right now, the playground only goes up to Crystal v0.32.1., so not all features are up to date.)

If you like what you see, view the source code on GitHub. Installing Crystal can be done via a variety of different platforms, just follow the installation guide.

Gaze into your crystal ball; will you learn this programming language?

The post Crystal 0.33.0 release: Combining elements of Ruby and C appeared first on JAXenter.

Source : JAXenter