- supports classes, interfaces, records
- supports static and dynamic arrays
- sand-boxed, automatic memory management
- strong typing
- type inference
- full support for meta-classes
- support function & methods pointers
- generalized helpers
- generalized “case of” and “in [...]” syntax
- scoped, inline variable declaration
- operator overloading
- compound assignment operators
- extensive exposure, declaration, inspection & debugging features
- inline implementations of class methods
- partial classes
- property expressions
- Automated exposure of Delphi types via RTTI
- Optional COM/OLE capability (via COM Connector)
- Optional RTTI direct connectivity (via RTTI Connector)
- Optional asm capability (32 bits, via NASM)
type THelloWorld = class procedure Put; // you can also implement out of line begin PrintLn('Hello, World!'); end end; var HelloWorld := new THelloWorld; // strong typing, inferred HelloWorld.Put; // no need to release objects thanks to automatic memory management
Much of your Pascal or Delphi knowledge will apply, for general information and news, see the blog. There is also a work in progress documentation wiki. Rosetta Code holds many DWS examples, which can be quickly compared with other languages and other Pascal dialects. If you have questions, you can ask them on StackOverflow, and you can also report more specific issues and suggestions.
DWScript Web Server
A sample DWScript Web Server is available in pre-compiled, installable form for Windows 2008R2 and above servers. It offers a high-performance server where pages and requests can be scripted.
While it can be used “as is”, users are encouraged to consider it as a starting point, and use it with their own business libraries and configurations.
DWScript is released under Mozilla Public License 1.1 which, in short, means that it’s free to use in open or closed source projects, free or commercial, provided you honor the following requirements:
- any application that makes use of DWScript, or is compiled by DWScript should “conspicuously” include a reference to DWScript in its credits, and include or link to the DWScript source files.
- modification to the source have to be made public under MPL.
If you can’t or don’t want to satisfy the above requirements, contact me for use under other license schemes.