Crystal is a general-purpose, object-oriented programming language designed and developed by Ary Borenszweig, Juan Wajnerman, Brian Cardiff, and more than 300 contributors. Inspired by Ruby, Crystal’s syntax is a compiled language with static type checking, but generally does not need to specify the types of variables or method parameters, and can achieve performance close to C/C++. Its type is resolved by an advanced global type inference algorithm.

Crystal 1.7.0 has been released, which includes 152 changes from 38 contributors since the 1.6.2 release. The main contents are as follows:

Interpreter REPL #12738

The interpreter’s REPL interface has received major usability improvements. Command Prompt now supports multiline input, command history, and multiple keybindings.

For technical reasons, the interpreter is currently only provided by default in brew. For other platforms, compile from source with interpreter=1 in the make option.

Regular expressions with PCRE2 #12790

Crystal relies on libpcre as the engine for executing regular expressions in Regex, and version 1.7.0 added support for its successor, libpcre2. There are no major differences in usage, PCRE2 is mostly backwards compatible and not many problems are expected.

PCRE2 will be implicitly enabled in the next release and may become the default engine. PCRE will continue to act as a fallback engine when updated libraries are not available.

other miscellaneous

language

  • Lib functions are now visible in top-level macros (#12848)
  • Added ArrayLiteral#-(other) and TupleLiteral#-(other) (#12646)
  • Annotations now support @[Deprecated] annotation (#12557)
  • Removed oct/bin floating point literals, the number syntax is broken and not very useful (#12687)

translater

  • ⚠️ Obsolete FreeBSD 11 compatibility has been removed (#12612)

standard library

  • ⚠️ File.real_path renamed to File.realpath, old version is deprecated, but works until the next major version (#12552)
  • ⚠️ libXML2’s error handling no longer leaks errors outside the current context (#12663, #12795)
  • Blocking of File#flock_shared and File#flock_exclusive no longer blocks threads (#12861)
  • Windows now also supports File#flock_shared and File#flock_exclusive (#12766)
  • BigDecimal#to_s supports scientific notation (#10805)

For more details, visit the changelog.

#Crystal #released #compiled #programming #language #syntax #similar #Ruby #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *