Version 0.8.12 released
2011年07月10日 Andreas Rumpf
Bugfixes
- Bugfix:
httpclientcorrect passes the path starting with/. - Bugfixes for the
htmlparsermodule. - Bugfix:
pegs.finddid not respectstartparameter. - Bugfix:
dialogs.ChooseFilesToOpendid not work if only one file is selected. - Bugfix: niminst:
nimrodis not default dir for every project. - Bugfix: Multiple yield statements in iterators did not cause local vars to be copied.
- Bugfix: The compiler does not emit very inaccurate floating point literals anymore.
- Bugfix: Subclasses are taken into account for
try exceptmatching. - Bugfix: Generics and macros are more stable. There are still known bugs left though.
- Bugfix: Generated type information for tuples was sometimes wrong, causing random crashes.
- Lots of other bugfixes: Too many to list them all.
Changes affecting backwards compatibility
- Operators starting with
^are now right-associative and have the highest priority. - Deprecated
os.getApplicationFilename: Useos.getAppFilenameinstead. - Deprecated
os.getApplicationDir: Useos.getAppDirinstead. - Deprecated
system.copy: Usesubstror string slicing instead. - Changed and documented how generalized string literals work: The syntax
module.re"abc"is now supported. - Changed the behaviour of
strutils.%,ropes.%if both notations$#and$iare involved. - The
pegsandremodules distinguish betweenreplaceandreplacefoperations. - The pointer dereference operation
p^is deprecated and might become^pin later versions or be dropped entirely since it is rarely used. Use the new notationp[]in the rare cases where you need to dereference a pointer explicitly. system.readFiledoes not returnnilanymore but raises anEIOexception instead.- Unsound co-/contravariance for procvars has been removed.
Language Additions
- Source code filters are now documented.
- Added the
linearScanEnd,unroll,shallowpragmas. - Added
emitpragma for direct code generator control. - Case statement branches support constant sets for programming convenience.
- Tuple unpacking is not enforced in
forloops anymore. - The compiler now supports array, sequence and string slicing.
- A field in an
enummay be given an explicit string representation. This yields more maintainable code than using a constantarray[TMyEnum, string]mapping. - Indices in array literals may be explicitly given, enhancing readability:
[enumValueA: "a", enumValueB: "b"]. - Added thread support via the
threadscore module and the--threads:oncommand line switch. - The built-in iterators
system.fieldsandsystem.fieldPairscan be used to iterate over any field of a tuple. With this mechanism operations like==andhashare lifted to tuples. - The slice
..is now a first-class operator, allowing code like:x in 1000..100_000.
Compiler Additions
- The compiler supports IDEs via the new group of
idetoolscommand line options. - The interactive mode (REPL) has been improved and documented for the first time.
- The compiler now might use hashing for string case statements depending on the number of string literals in the case statement.
Library Additions
- Added
listsmodule which contains generic linked lists. - Added
setsmodule which contains generic hash sets. - Added
tablesmodule which contains generic hash tables. - Added
queuesmodule which contains generic sequence based queues. - Added
intsetsmodule which contains a specialized int set data type. - Added
scgimodule. - Added
smtpmodule. - Added
encodingsmodule. - Added
re.findAll,pegs.findAll. - Added
os.findExe. - Added
parseutils.parseUntilandparseutils.parseWhile. - Added
strutils.align,strutils.tokenize,strutils.wordWrap. - Pegs support a captured search loop operator
{@}. - Pegs support new built-ins:
\letter,\upper,\lower,\title,\white. - Pegs support the new built-in
\skipoperation. - Pegs support the
$and^anchors. - Additional operations were added to the
complexmodule. - Added
strutils.formatFloat,strutils.formatBiggestFloat. - Added unary
<for nice looking excluding upper bounds in ranges. - Added
math.floor. - Added
system.resetand a version ofsystem.openthat returns aTFileand raises an exception in case of an error. - Added a wrapper for
redis. - Added a wrapper for
0mqvia thezmqmodule. - Added a wrapper for
sphinx. - Added
system.newStringOfCap. - Added
system.raiseHookandsystem.outOfMemHook. - Added
system.writeFile. - Added
system.shallowCopy. system.echois guaranteed to be thread-safe.- Added
preludeinclude file for scripting convenience. - Added
typeinfocore module for access to runtime type information. - Added
marshalmodule for JSON serialization.