Version 0.9.2 released
20 May 2013 Dominik Picheta
We are pleased to announce that version 0.9.2 of the Nimrod compiler has been released. This release has attracted by far the most contributions in comparison to any other release.
This release brings with it many new features and bug fixes, a list of which
can be seen later. One of the major new features is the effect system together
with exception tracking which allows for checked exceptions and more,
for further details check out the manual .
Another major new feature is the introduction of statement list expressions,
more details on these can be found here.
The ability to exclude symbols from modules has also been
implemented, this feature can be used like so:
import module except symbol.
Thanks to all contributors!
- The old GC never collected cycles correctly. Fixed but it can cause
performance regressions. However you can deactivate the cycle collector
GC_disableMarkAndSweepand run it explicitly at an appropriate time or not at all. There is also a new GC you can activate with
--gc:markAndSweepwhich does not have this problem but is slower in general and has no realtime guarantees.
castfor floating point types now does the bitcast as specified in the manual. This breaks code that erroneously uses
castto convert different floating point values.
- SCGI module’s performance has been improved greatly, it will no longer block on many concurrent requests.
- In total fixed over 70 github issues and merged over 60 pull requests.
- There is a new experimental mark&sweep GC which can be faster (or much
slower) than the default GC. Enable with
system.onRaiseto support a condition system.
system.localsthat provides access to a proc’s locals.
macros.quotefor AST quasi-quoting.
system.unsafeNewto support hacky variable length objects.
objecttoo; they used to only support tuples.
system.CurrentSourcePathreturning the full file-system path of the current source file.
macrosmodule now contains lots of useful helpers for building up abstract syntax trees.
Changes affecting backwards compatibility
sharedis a keyword now.
- The way indentation is handled in the parser changed significantly. However, this affects very little (if any) real world code.
- The expression/statement unification has been implemented. Again this only affects edge cases and no known real world code.
- Changed the async interface of the
- WideStrings are now garbage collected like other string types.
doc2command does not generate output for the whole project anymore. Use the new
--projectswitch to enable this behaviour.
- The compiler can now warn about shadowed local variables. However, this needs
to be turned on explicitly via
- The compiler now supports almost every pragma in a
- Generic converters have been implemented.
- Added a highly experimental
noforwardpragma enabling a special compilation mode that largely eliminates the need for forward declarations.
case expressionsare now supported.
- Table constructors now mimic more closely the syntax of the
- Nimrod can now infer the return type of a proc from its body.
- Added a
mixindeclaration to affect symbol binding rules in generics.
- Exception tracking has been added and the
doc2command annotates possible exceptions for you.
- User defined effects (“tags”) tracking has been added and the
doc2command annotates possible tags for you.
- Types can be annotated with the new syntax
not nilto explicitly state that
nilis not allowed. However currently the compiler performs no advanced static checking for this; for now it’s merely for documentation purposes.
exportstatement has been added to the language: It can be used for symbol forwarding so client modules don’t have to import a module’s dependencies explicitly.
- Overloading based on ASTs has been implemented.
- Generics are now supported for multi methods.
- Objects can be initialized via an object constructor expression.
- There is a new syntactic construct
(;)unifying expressions and statements.
- You can now use
from module import nilif you want to import the module but want to enforce fully qualified access to every symbol in
Notes for the future
- The scope rules of
ifstatements will change in 0.9.4. This affects the
socketsmodule will become a low-level wrapper of OS-specific socket functions. All the high-level features of the current
socketsmodule will be moved to a