e007_version_0_9_2.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Version 0.9.2 released
  2. ======================
  3. .. container:: metadata
  4. Posted by Dominik Picheta on 20/05/2013
  5. We are pleased to announce that version 0.9.2 of the Nimrod compiler has been
  6. released. This release has attracted by far the most contributions in comparison
  7. to any other release.
  8. This release brings with it many new features and bug fixes, a list of which
  9. can be seen later. One of the major new features is the effect system together
  10. with exception tracking which allows for checked exceptions and more,
  11. for further details check out the `manual <manual.html#effect-system>`_.
  12. Another major new feature is the introduction of statement list expressions,
  13. more details on these can be found `here <manual.html#statement-list-expression>`_.
  14. The ability to exclude symbols from modules has also been
  15. implemented, this feature can be used like so: ``import module except symbol``.
  16. Thanks to all `contributors <https://github.com/Araq/Nimrod/contributors>`_!
  17. Bugfixes
  18. --------
  19. - The old GC never collected cycles correctly. Fixed but it can cause
  20. performance regressions. However you can deactivate the cycle collector
  21. with ``GC_disableMarkAndSweep`` and run it explicitly at an appropriate time
  22. or not at all. There is also a new GC you can activate
  23. with ``--gc:markAndSweep`` which does not have this problem but is slower in
  24. general and has no realtime guarantees.
  25. - ``cast`` for floating point types now does the bitcast as specified in the
  26. manual. This breaks code that erroneously uses ``cast`` to convert different
  27. floating point values.
  28. - SCGI module's performance has been improved greatly, it will no longer block
  29. on many concurrent requests.
  30. - In total fixed over 70 github issues and merged over 60 pull requests.
  31. Library Additions
  32. -----------------
  33. - There is a new experimental mark&sweep GC which can be faster (or much
  34. slower) than the default GC. Enable with ``--gc:markAndSweep``.
  35. - Added ``system.onRaise`` to support a condition system.
  36. - Added ``system.locals`` that provides access to a proc's locals.
  37. - Added ``macros.quote`` for AST quasi-quoting.
  38. - Added ``system.unsafeNew`` to support hacky variable length objects.
  39. - ``system.fields`` and ``system.fieldPairs`` support ``object`` too; they
  40. used to only support tuples.
  41. - Added ``system.CurrentSourcePath`` returning the full file-system path of
  42. the current source file.
  43. - The ``macros`` module now contains lots of useful helpers for building up
  44. abstract syntax trees.
  45. Changes affecting backwards compatibility
  46. -----------------------------------------
  47. - ``shared`` is a keyword now.
  48. - Deprecated ``sockets.recvLine`` and ``asyncio.recvLine``, added
  49. ``readLine`` instead.
  50. - The way indentation is handled in the parser changed significantly. However,
  51. this affects very little (if any) real world code.
  52. - The expression/statement unification has been implemented. Again this
  53. only affects edge cases and no known real world code.
  54. - Changed the async interface of the ``scgi`` module.
  55. - WideStrings are now garbage collected like other string types.
  56. Compiler Additions
  57. ------------------
  58. - The ``doc2`` command does not generate output for the whole project anymore.
  59. Use the new ``--project`` switch to enable this behaviour.
  60. - The compiler can now warn about shadowed local variables. However, this needs
  61. to be turned on explicitly via ``--warning[ShadowIdent]:on``.
  62. - The compiler now supports almost every pragma in a ``push`` pragma.
  63. - Generic converters have been implemented.
  64. - Added a **highly experimental** ``noforward`` pragma enabling a special
  65. compilation mode that largely eliminates the need for forward declarations.
  66. Language Additions
  67. ------------------
  68. - ``case expressions`` are now supported.
  69. - Table constructors now mimic more closely the syntax of the ``case``
  70. statement.
  71. - Nimrod can now infer the return type of a proc from its body.
  72. - Added a ``mixin`` declaration to affect symbol binding rules in generics.
  73. - Exception tracking has been added and the ``doc2`` command annotates possible
  74. exceptions for you.
  75. - User defined effects ("tags") tracking has been added and the ``doc2``
  76. command annotates possible tags for you.
  77. - Types can be annotated with the new syntax ``not nil`` to explicitly state
  78. that ``nil`` is not allowed. However currently the compiler performs no
  79. advanced static checking for this; for now it's merely for documentation
  80. purposes.
  81. - An ``export`` statement has been added to the language: It can be used for
  82. symbol forwarding so client modules don't have to import a module's
  83. dependencies explicitly.
  84. - Overloading based on ASTs has been implemented.
  85. - Generics are now supported for multi methods.
  86. - Objects can be initialized via an *object constructor expression*.
  87. - There is a new syntactic construct ``(;)`` unifying expressions and
  88. statements.
  89. - You can now use ``from module import nil`` if you want to import the module
  90. but want to enforce fully qualified access to every symbol in ``module``.
  91. Notes for the future
  92. --------------------
  93. - The scope rules of ``if`` statements will change in 0.9.4. This affects the
  94. ``=~`` pegs/re templates.
  95. - The ``sockets`` module will become a low-level wrapper of OS-specific socket
  96. functions. All the high-level features of the current ``sockets`` module
  97. will be moved to a ``network`` module.