* new: `nim -i cmd` * rename -i to -e (for eval); consistent with majority of other programing languages * `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works * honor --betterRun * address comments * --eval alias for -e (replaces undocumented --eval which was a noop) * --eval now defaults to e (nimscript) instead of r * address comment: remove -e, only keep --eval * address comment * fixup * Update compiler/nimconf.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
1.7 KiB
v1.6.x - yyyy-mm-dd
Standard library additions and changes
-
Make
{.requiresInit.}pragma to work fordistincttypes. -
Added a macros
enumLenfor returning the number of items in an enum to thetypetraits.nimmodule. -
preludenow works with the JavaScript target. -
Added
ioutilsmodule containingduplicateandduplicateToto duplicateFileHandleusing C functiondupanddup2. -
Added
almostEqualinmathfor comparing two float values using a machine epsilon. -
The JSON module can now handle integer literals and floating point literals of arbitrary length and precision. Numbers that do not fit the underlying
BiggestIntorBiggestFloatfields are kept as string literals and one can use external BigNum libraries to handle these. TheparseFloatfamily of functions also has now optionalrawIntegersandrawFloatsparameters that can be used to enforce that all integer or float literals remain in the "raw" string form so that client code can easily treat small and large numbers uniformly. -
Added
randStatetemplate that exposes the default random number generator. Useful for library authors. -
Added std/enumutils module containing
genEnumCaseStmtmacro that generates case statement to parse string to enum. -
Removed deprecated
iupmodule from stdlib, it has already moved to nimble.
Language changes
Compiler changes
- Added
--declaredlocsto show symbol declaration location in messages. - Source+Edit links now appear on top of every docgen'd page when
nim doc --git.url:url ...is given. - Added
nim --eval:cmdto evaluate a command directly, seenim --help