Many improvements to 0.15.0 changelog in news article.

This commit is contained in:
Dominik Picheta
2016-09-28 21:36:06 +02:00
parent 5b4a5d8615
commit 6953c2e691

View File

@@ -10,17 +10,16 @@ Some text here.
Changes affecting backwards compatibility
-----------------------------------------
- The ``json`` module uses an ``OrderedTable`` rather than a ``Table``
- The ``json`` module now uses an ``OrderedTable`` rather than a ``Table``
for JSON objects.
- De-deprecated ``re.nim`` because we have too much code using it
and it got the basic API right.
- ``split`` with ``set[char]`` as a delimiter in ``strutils.nim``
no longer strips and splits characters out of the target string
- The ``split`` `(doc) <http://nim-lang.org/docs/strutils.html#split,string,set[char],int>`_
procedure in the ``strutils`` module (with a delimiter of type
``set[char]``) no longer strips and splits characters out of the target string
by the entire set of characters. Instead, it now behaves in a
similar fashion to ``split`` with ``string`` and ``char``
delimiters. Use ``splitWhitespace`` to get the old behaviour.
- The command invocation syntax will soon apply to open brackets
and curlies too. This means that code like ``a [i]`` will be
interpreted as ``a([i])`` and not as ``a[i]`` anymore. Likewise
@@ -29,80 +28,114 @@ Changes affecting backwards compatibility
Warning: a [b] will be parsed as command syntax; spacing is deprecated
See `<https://github.com/nim-lang/Nim/issues/3898>`_ for the relevant
discussion.
See `Issue #3898 <https://github.com/nim-lang/Nim/issues/3898>`_ for the
relevant discussion.
- Overloading the special operators ``.``, ``.()``, ``.=``, ``()`` now
should be enabled via ``{.experimental.}``.
needs to be enabled via the ``{.experimental.}`` pragma.
- ``immediate`` templates and macros are now deprecated.
Instead use ``untyped`` parameters.
- The metatype ``expr`` is deprecated. Use ``untyped`` instead.
- The metatype ``stmt`` is deprecated. Use ``typed`` instead.
Use ``untyped`` `(doc) <http://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters>`_
parameters instead.
- The metatype ``expr`` is deprecated. Use ``untyped``
`(doc) <http://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters>`_ instead.
- The metatype ``stmt`` is deprecated. Use ``typed``
`(doc) <http://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters>`_ instead.
- The compiler is now more picky when it comes to ``tuple`` types. The
following code used to compile, now it's rejected:
.. code-block:: nim
import tables
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64] ]()
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64]]()
rocketaims["hi"] = {(-1.int8, 0.int8): 0.int64}.toTable()
Instead be consistent in your tuple usage and use tuple names for tuples
that have tuple name:
Instead be consistent in your tuple usage and use tuple names for named tuples:
.. code-block:: nim
import tables
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64] ]()
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64]]()
rocketaims["hi"] = {(k: -1.int8, v: 0.int8): 0.int64}.toTable()
- Now when you compile console application for Windows, console output
- Now when you compile console applications for Windows, console output
encoding is automatically set to UTF-8.
- Unhandled exceptions in JavaScript are now thrown regardless ``noUnhandledHandler``
is defined. But now they do their best to provide a readable stack trace.
- Unhandled exceptions in JavaScript are now thrown regardless of whether
``noUnhandledHandler`` is defined. But the stack traces should be much more
readable now.
- In JavaScript ``system.alert`` is deprecated. Use ``dom.alert`` instead.
- In JavaScript, the ``system.alert`` procedure has been deprecated.
Use ``dom.alert`` instead.
- ``AsyncHttpClient.headers`` type is now ``HttpHeaders``.
- De-deprecated ``re.nim`` because there is too much code using it
and it got the basic API right.
- The ``httpclient.request`` procedure that takes the ``httpMethod`` as a string
value no longer requires this value to be prefixed with ``"http"``
- The type of ``headers`` field in the ``AsyncHttpClient`` type
`(doc) <http://nim-lang.org/docs/httpclient.html#AsyncHttpClient>`_
has been changed
from a string table to the specialised ``HttpHeaders`` type.
- The ``httpclient.request``
`(doc) <http://nim-lang.org/docs/httpclient.html#request,AsyncHttpClient,string,string,string>`_
procedure which takes the ``httpMethod`` as a string
value no longer requires it to be prefixed with ``"http"``
(or similar).
- Converting a ``HttpMethod`` value to string using the ``$`` operator will
- Converting a ``HttpMethod``
`(doc) <nim-lang.org/docs/httpcore.html#HttpMethod>`_
value to a string using the ``$`` operator will
give string values without the ``"Http"`` prefix now.
- The ``Request`` object defined in the ``asynchttpserver`` module now uses
- The ``Request``
`(doc) <http://nim-lang.org/docs/asynchttpserver.html#Request>`_
object defined in the ``asynchttpserver`` module now uses
the ``HttpMethod`` type for the request method.
Library Additions
-----------------
- Added ``readHeaderRow`` and ``rowEntry`` to ``parsecsv.nim`` to provide
- Added ``readHeaderRow`` and ``rowEntry`` to the ``parsecsv``
`(doc) <http://nim-lang.org/docs/parsecsv.html>`_ module
to provide
a lightweight alternative to python's ``csv.DictReader``.
- Added ``setStdIoUnbuffered`` proc to ``system.nim`` to enable unbuffered I/O.
- Added ``center`` and ``rsplit`` to ``strutils.nim`` to
provide similar Python functionality for Nim's strings.
- Added ``setStdIoUnbuffered`` proc to the ``system`` module to enable
unbuffered I/O.
- Added ``center`` and ``rsplit`` to the ``strutils``
`(doc) <http://nim-lang.org/docs/strutils.html>`_ module
to provide similar Python functionality for Nim's strings.
- Added ``isTitle``, ``title``, ``swapCase``, ``isUpper``, ``toUpper``,
``isLower``, ``toLower``, ``isAlpha``, ``isSpace``, and ``capitalize``
to ``unicode.nim`` to provide unicode aware case manipulation and case
to the ``unicode.nim``
`(doc) <http://nim-lang.org/docs/unicode.html>`_ module
to provide unicode aware case manipulation and case
testing.
- Added a new module ``lib/pure/strmisc.nim`` to hold uncommon string
- Added a new module ``strmisc``
`(doc) <http://nim-lang.org/docs/strmisc.html>`_
to hold uncommon string
operations. Currently contains ``partition``, ``rpartition``
and ``expandTabs``.
- Split out ``walkFiles`` in ``os.nim`` to three separate procs in order
to make a clear distinction of functionality. ``walkPattern`` iterates
- Split out ``walkFiles`` in the ``os``
`(doc) <http://nim-lang.org/docs/os.html>`_ module to three separate procs
in order to make a clear distinction of functionality. ``walkPattern`` iterates
over both files and directories, while ``walkFiles`` now only iterates
over files and ``walkDirs`` only iterates over directories.
- Added synchronous ``HttpClient`` in the ``httpclient`` module.
- Added a synchronous ``HttpClient`` in the ``httpclient``
`(doc) <http://nim-lang.org/docs/httpclient.html>`_
module. The old
``get``, ``post`` and similar procedures are now deprecated in favour of it.
- Added a new macro called ``multisync`` allowing you to write procedures for
synchronous and asynchronous sockets with no duplication.
synchronous and asynchronous sockets with no duplication.
- The ``async`` macro will now complete ``FutureVar[T]`` parameters
automatically unless they have been completed already.
@@ -112,22 +145,25 @@ Compiler Additions
- The ``-d/--define`` flag can now optionally take a value to be used
by code at compile time.
`(doc) <http://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas>`_
Nimscript Additions
-------------------
- Finally it's possible to dis/enable specific hints and warnings in
Nimscript via the procs ``warning`` and ``hint``.
- It's possible to enable and disable specific hints and warnings in
Nimscript via the ``warning`` and ``hint`` procedures.
- Nimscript exports a proc named ``patchFile`` which can be used to
patch modules or include files for different Nimble packages, including
the ``stdlib`` package.
Language Additions
------------------
- Added ``{.intdefine.}`` and ``{.strdefine.}`` macros to make use of
(optional) compile time defines.
`(doc) <http://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas>`_
- If the first statement is an ``import system`` statement then ``system``
is not imported implicitly anymore. This allows for code like
``import system except echo`` or ``from system import nil``.
@@ -138,7 +174,7 @@ Bugfixes
The list below has been generated based on the commits in Nim's git
repository. As such it lists only the issues which have been closed
via a commit, for a full list see
`this link on Github <https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%222016-06-22+..+2016-09-27%22+>`_.
`this link on Github <https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%222016-06-22+..+2016-09-28%22+>`_.
- Fixed "RFC: should startsWith and endsWith work with characters?"
(`#4252 <https://github.com/nim-lang/Nim/issues/4252>`_)