DWScript August 2012 news
Here are the recent changes for DWScript from the SVN side.
As things settle down, next version should hit RC status by the end of the month.
Here are the recent changes for DWScript from the SVN side.
As things settle down, next version should hit RC status by the end of the month.
Part 1 left us with a large cryptic looking string (a recursively applied grammar applied to an axiom, for the purists).
In part 2 we’ll go from that big string to a visual representation, by making use of that string as a set of commands for a turtle language.
Turtle graphics came to fame in the days of Darwin’s voyage to the Galapagos the Logo programming language, and in many ways are the grand-daddy of vector graphics languages like SVG.
For more details, read the turtle graphics article in wikipedia, it’s (at the moment) short and to the point.
The class of grammar-based fractals known as Lindenmayer system allows generating an interesting variety of geometrical and botanical visuals.
To the right is a representation of a “Fractal Plant”, which is generated from just two simple (if cryptic-looking) rules applied recursively.
In simple terms, L-System starts from a string (called an axiom), to which rules are applied recursively. Rules are a set of substitution strings for characters in the original string.
DWScript source code recently introduced a newcomer: TRefCountedObject.
This base class takes the place of TObject in dwsUtils, and is now present throughout the DWScript code. What it adds is, well, a manually reference-counted class.
Recent additions to DWScript… as well as for next Smart MS version 😉
With the SmartMS release a deal has also been concluded between Creative IT and Optimale Systemer AS, to safeguard their investments and ensure future evolutions, the JavaScript CodeGen portion of DWScript will no longer be developed as open-source, but will be exclusive to Optimale Systemer AS. Sales permitting, this should allow to dedicate more time to improving JavaScript code generation, optimizations and debugging support 🙂
Support for partial classes has been added to DWScript: they can be declared as “class partial (TAncestor)” as well as with the Oxygene syntax “partial class (TAncestor)” syntax.
When “record with methods” were introduced, an important feature was overlooked: mutability.
This article discusses the problem, and introduces a possible syntax extension to solve it. Ideas & comments welcome!
In the SVN version, DWScript now has experimental support for helpers. This is a generalization of Delphi’s class helpers, which can be applied to (almost) any type. You can also have multiple helpers per type.