Property expressions and statements
Object Pascal does allow binding a property to a field for direct read/writer, but we all have seen properties that required a slightly more complex getter or setter, and that usually meant a method for both. DWScript (svn trunk) & Smart Pascal (1.1) now support property expressions and statements, so the syntax is extended to allow:
property Name : Type read (expression) write (expression|statement)
Under the hood, the compiler will generate an unnamed getter or setter method when appropriate.
(more…)
Graphics competition, two days left to register!
..and maybe win first prize, which is the tablet of your choice?
This is the first competition out of four this year. So this is your chance to win some exciting prices by showing off your Object Pascal skills!
The topic of this round is: graphics programming (eg. demo-scene, fractal art, visualizations etc).
Registration is before the 10th of February, follow the link above for more details!
Introducing dwsDatabase
DWScript now has database support classes built-in, these are based on a thin, interface-based layer, and can be used Delphi-side as well to get automatic memory management for simple DB access.
It currently supports mORMot SynDB and Universal InterBase, meaning it gets high performance native connectivity to SQLite, FireBird, Oracle, ODBC and OleDB (MySQL, MS SQLServer, MS Jet, AS400…).
SamplingProfiler 1.8.0
Version 1.8.0 of SamplingProfiler is now available.
The options dialog now support Delphi XE2 & Delphi XE3 search/browse paths, other changes are only indirect fixes/improvements related to the components and libraries used in SamplingProfiler.
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 (?:).
DWScript and the Gabelou
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:
DWScript pre-Apocalypse news
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:
- the JSON connector, which gives direct, JS-like access to JSON-based data objects
- the Gabelou, which aims to become to DWScripot what StyleCop is to C#.
Also the old Indy-based webserver demo is being replaced by one based on Synopse high-performance http server classes.
Desktop HTML5 apps game changer? node-webkit
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.
Introducing “unit namespace”
DWScript now has a new “unit namespace” feature, which aims at killing several birds with one stone:
- supporting “classic” namespace as found in Java or .Net
- supporting aggregate namespaces and conditional units
- supporting unit deprecation and splitting with backward-compatibility

