* Support code hot reloading for JavaScript projects * Add some missing JavaScript symbols and APIs * fix the Travis build * (review changes) remove the js type from the standard library as it doesn't follow NEP-1 * more additions to the DOM module * Follow NEP-1 in jsffi; spell 'hot code reloading' correctly * introduce a jscore module * Document jscore module. * readded js type * Remove the '$' operator that doesn't behave
2.7 KiB
v0.X.X - XX/XX/2018
Changes affecting backwards compatibility
- The stdlib module
futurehas been renamed tosugar. macros.callsiteis now deprecated. Since the introduction ofvarargsparameters this became unnecessary.- Anonymous tuples with a single element can now be written as
(1,)with a trailing comma. The underlying AST isnnkTupleConst(newLit 1)for this example.nnkTupleConstris a new node kind your macros need to be able to deal with!
Breaking changes in the standard library
-
re.splitfor empty regular expressions now yields every character in the string which is what other programming languages chose to do. -
The returned tuple of
system.instantiationInfonow has a third field containing the column of the instantiation. -
``cookies.setCookie` no longer assumes UTC for the expiration date.
Breaking changes in the compiler
Library additions
re.splitnow also supports themaxsplitparameter for consistency withstrutils.split.- Added
system.toOpenArrayin order to support zero-copy slicing operations. This is currently not yet available for the JavaScript target. - Added
getCurrentDir,findExe,cpDirandmvDirprocs tonimscript.
Library changes
macros.astGenRepr,macros.lispReprandmacros.treeReprnow escapes the content of string literals consistently.macros.NimSymandmacros.NimIdentis now deprecated in favor of the more generalNimNode.
Language additions
- Dot calls combined with explicit generic instantiations can now be written
as
x.y[:z].x.y[:z]that is transformed intoy[z](x)in the parser. funcis now an alias forproc {.noSideEffect.}.
Language changes
-
The
importcpppragma now allows importing the listed fields of generic C++ types. Support for numeric parameters have also been added through the use ofstatic[T]types. (#6415) -
Native C++ exceptions can now be imported with
importcpppragma. Imported exceptions can be raised and caught just like Nim exceptions. More details in language manual.
Tool changes
jsondoc2has been renamedjsondoc, similar to howdoc2was renameddoc. The oldjsondoccan still be invoked withjsondoc0.
Compiler changes
-
The VM's instruction count limit was raised to 1 billion instructions in order to support more complex computations at compile-time.
-
Support for hot code reloading has been implemented for the JavaScript target. To use it, compile your code with
--hotReloading:onand use a helper library such as LiveReload or BrowserSync. -
Added
macros.getProjectPathandospaths.putEnvprocs to Nim's virtual machine.