if then (else) expressions
“if” expressions are now supported in DWScript SVN, those were introduced to Pascal by Oxygene a couple years back, and are Pascal’s verbose version of the C ternary operator (?:).
“if” expressions are now supported in DWScript SVN, those were introduced to Pascal by Oxygene a couple years back, and are Pascal’s verbose version of the C ternary operator (?:).
After having survived the Mayan apocalypse and just before the year ends, and the US economy falls from the fiscal cliff into the pit of recession, here is a quick look at thirteen features of DWScript, so you don’t come into 2013 unaware 🙂
The Gabelou is now available in the DWScript SVN, this is a set of classes and rules that aims to watch over coding styles.
Currently only a handful of naming rules are declared, with more coming.
You can run the Gabelou by adding the dwsGabelou unit to your uses, then create an instance, add custom rules or use built-in ones (f.i. those in dwsGabelouStdRules), compile a script program as usual, then invoke Gabelou on the compiled program:
With the end of the world in a few days, it’s time to flush the what’s new log for DWScript.
There are two major items that will be discussed in future posts:
Also the old Indy-based webserver demo is being replaced by one based on Synopse high-performance http server classes.
Recently stumbled upon node-webkit, an open-source from Intel Open Source Technology Center, which is deliciously “simple”: combine a standalone webkit (Chromium) build and node.js into a runtime.
Webkit/Chromium brings a high-performance HTML5 environment with JavaScript JITting compiler, WebGL, Audio, hardware accelerated Canvas, camera access, etc.
DWScript now has a new “unit namespace” feature, which aims at killing several birds with one stone:
Latest DWScript SVN introduces support a new “for var” syntax extension for loops.
It combines the loop with the loop variable declaration (type-inferred), while scoping the variable to the loop.
The syntax of “for to/downto” loops is thus extended to:
A new DWScript 2.3 preview 2 7zip (422 kB) is available for download for those that don’t use the DWScript SVN. This version should be the last before a release candidate for 2.3. As the lead version is Delphi XE, users of Delphi 2009, 2010, XE2 and XE3 are especially encouraged to report any issues they encounter. FreePascal support is still considered experimental at this moment.
A while ago I asked about the name of TObject ancestor, well, it’s now live in the SVN and its name is ‘Object‘.
Object is thus the new root class, above TObject. Eventually, it’ll be the ancestor for every other type.
DWScript (SVN version) should now compile under Delphi XE3, thanks to Steffen Binas for providing a workaround for a compiler bug (internal error URW1147).
The workaround will alas reduce performance, for a proper fix, a futureXE3 update will be required,see QC #109187.
While I’m at it, I might also raise awareness of another XE3 bug, QC #108942 (internal error G9413).
(on a side note, my XE3 trial expired, so any fixes or workarounds for XE3 will have to come from you guys)