[1]This summary of recent DWS changes is coming a bit late, and there is quite a bit to cover. Here is a quick, partial roundup of what changed since the last update.
Language changes:
- Initial support for overloads (currently limited to standalone functions/procedures).
- New operator “sar” for bitwise shift arithmetic right.
- Delphi-like “dotted unit names” are now supported.
- Support for classic Delphi-style local procedures declaration in units (before the “begin”).
- Support const “blocks” in units.
- Support for “array [TEnumeratedType] of” short declaration for static arrays.
- New hints for unused private symbols and redundant scope specifiers.
- New built-in functions: LastDelimiter, dynamic array’s Insert(), Min()/Max() overloads.
Library and script engine changes:
- TContextMap & TSymbolDictionary were renamed to TdwsSourceContextMap & TdwsSymbolDictionary.
- The context map content has been significantly reorganized, fixed and is now more detailed.
- TdwsSuggestions can now optionally suggest keywords too.
- Random functions now based on XorShift [2], with independent random per execution.
- New demo/sample: simple web server based on Indy with multi-threaded server-side script execution.
- Faster DWS SynEdit highlighter.
- Improved documentation.
- Various minor fixes and improvements.
JavaScript & CodeGen changes:
- Closures [3] are now supported by the JavaScript CodeGen.
- Added Smart-Linking capabilities to the CodeGen when program is compiled with context map & symbol dictionary. Its capabilities and limitations are currently roughly similar to Delphi’s.
- Improved JavaScript CodeGen for various code generation cases (faster and smaller, as measured through jsperf [4] benchmarking on various browser engines).
- Improved JavaScript obfuscator.
- Improved JavaScript minifier.