Delphi Web Script (DWS) is a object pascal scripting engine, similar to PHP and Python

Like any scripting engine DWS takes your script code, parses it, and constructs a program-model.

This model is traditionally executed, and as the name implies DWS was designed to run on a server, much like ASP or PHP.


What Quartex Pascal does instead of executing this program model, is that we convert the model into JavaScript.

So instead of your code relying on a scripting engine to work, it can instead be used to compile object-pascal to JavaScript that runs everywhere.

Adapted for the web


In order to make object-pascal suitable for web development, DWScript had to be modernized for the task.

Between 2010 and 2013 Eric Grange and Jon-Lennart Aasenden worked closely on this pioneering effort: to modernize object-pascal and adapt it to a completely new paradigm.


Part of this work includes:


  • Add modern language features, typical of C# and Java, such as external classes, partial classes, closures, lambdas and operator overloading
  • Keep the strictly typed nature of object pascal, but allow for the flamboyance and creativity that JavaScript allows
  • Implement true OOP on compiler level, where objects maintain their own VMT (read: avoid prototype cloning).
  • Recycle ASM blocks for inline JavaScript
  • Recycle the variant datatype as a direct JavaScript variable, allowing for direct, 1:1 access to JavaScript structures and elements


With this new and exciting dialect in place, we suddenly had a language with the best of both worlds: the structure and reliability of classical programming, and the freedom and platform independence of JavaScript.

Notes


Eric is the official maintainer of DWScript. He is not associated with Quartex Pascal in any professional capacity.

Quartex Pascal as a product was created years later. Created because we needed an IDE, compiler and run-time library that made large-scale web deployment easy and cost effective.