Smart Pascal

Top  Previous  Next

Smart Pascal programming language

 

The programming language used in the Smart Mobile Studio is a dialect of Object Pascal which is derived from DWScript (Delphi Web Script) called Smart Pascal, but enhanced and adapted for Smart Mobile Studio, a commercial development suite which generates JavaScript rather than machine code. The front end (parser) comes from the DWScript project which implements a language based on the Delphi programming environment with additions from FreePascal and Oxygene.

 

Smart Pascal is a RAD (rapid application development) language and ships with a substantial library of classes and pre-made components. The Smart Pascal compiler is an advanced source-to-source compiler generating rich, HTML5 compliant, server independent applications. Compiled Smart applications can be executed in any modern HTML5 capable browser. A compiled program is typically embedded within a DIV container element or alternatively set to occupy the entire display.

 

The run-time library was specifically built for increased productivity and time-to-market with regards to mobile application development. Smart Pascal reduces development time for JavaScript radically both linguistically, by means of Object Pascal and true object oriented programming, but also with regards to how the run-time library's class and component system is architected. The RTL interacts with the document object model and JavaScript environment in the same way a native language would interact with a operative system; abstracting common denominators and automating complex tasks.

 

Smart Pascal is also popular for micro-controller programming (Espruino) and nodeJS client/server modules.

 

Background

Smart Mobile Studio was architected by Norwegian Jon Lennart Aasenden and Frenchman Eric Grange. The technology is published by software company Optimale Systemer. The language uses a popular open-source scripting engine called Delphi Web Script (DWScript) for syntax verification and parsing. On the 18'th of May 2012 Optimale Systemer officially disclosed that they had acquired the rights to a custom code generator written by Eric Grange, the maintainer of delphi web script, from his company Creative IT, France.

 

Prior to working together with Eric Grange, Jon Lennart Aasenden had published several proposals where he outlined his thoughts for a new object pascal compiler; A compiler that would target Javascript and the browser as opposed to x86 or ARM processors. He was initially meet with heavy criticism from the Delphi and Free Pascal community, but found support in Eric Grange who verified and demonstrated that JavaScript had come of age - and could now be used to build large-scale, serious business applications. Jon Lennart went on to write the Smart Pascal run-time library and integrated development environment while Eric Grange perfected the code generator and language improvements.

 

Prototype

The first prototype (alpha build) was released December 2011 (20.12.2011) and the duo quickly began to attract other programmers curious about the new platform. The project also received a full two page coverage in Blaize Pascal Magazine (issue 31), which helped promote the dialect considerably. As a result the run-time library and tools grew to include support for advanced technologies like Remobjects SDK and Embarcadero Datasnap - donated to the framework by software developer Andre Mussche. From version 2.0 Smart Pascal supported nodeJS, Web Workers and the Espurino micro-controller platform courtesy of german mathematician and developer Christian Budde.

 

At the same time, technical author and software architect Primož Gabrijelcic (author of the book Parallel programming among other titles) decided to write a book on Smart Pascal: A smart book, which for programming languages is often regarded as a stamp of approval.

 

Consensus

Smart Pascal is often regarded as a powerful oddity in the world of object pascal. Even though the language supports nearly every syntax feature defined by Embarcadero Delphi, it often breaks or expand on the syntax in order to introduce radical but effective solutions. Solutions that makes it better suited for asynchronous programming. As such it promotes concepts borrowed from both JavaScript and Objective C, mixed with elements from C++, C# and Smalltalk. The result is a flexible and dynamic flavor of Object Pascal which greatly simplifies server-less HTML5 JavaScript development.

 

Powerful as the dialect is, many traditional Object Pascal programmers regard Smart as a hybrid language, the common objection being- that Smart promotes features somewhat alien to the established principles of Object Pascal. Smart supporters argue that this new dialect is necessary for modern software development, and that this is exactly what Object Pascal needs to evolve and adapt - pointing to generics as a recent paradigm shift. As such, the supporters argue that the new language does not pose a threat to the long established syntax, but enrich it with proven techniques from more modern languages.