Static classes, quote-delimited strings, final, hints/warnings

Here is a quick summary of recent changes SVN-side for DWScript:

  • static classes are now in DWS, like the Prism/C# variant, they are classes which cannot be instantiated and can only have class methods or properties, but as DWScript supports the concept of meta-classes, unlike in Prism/C#, they can be virtual and sub-classed (unless you mark them as “sealed” too, of course).
    type
       TStatic = class static
          class procedure Whatever;
       end;

    Note that a static class can only be subclassed to a static class, and can only inherit from a static class (or TObject).

  • quote-delimited strings can now be used as an alternative to apostrophe-delimited strings as in JavaScript and Prism, though they are still single-line strings, like in JS and unlike in Prism.
    var hello := "bonjour l'ami";
  • the final qualifier is now supported, it can be used to indicate that a method can no longer be overridden by subclasses.
  • the compiler will now warn about invoking constructors on instances (rather than classes) when outside of a constructor.
  • method override checks have been made stricter and compiler should now report all cases of incorrect overrides.
  • new directives {$HINTS ON|OFF} and {$WARNINGS ON|OFF} are now supported, and allow to turn on/off the hints and warnings respectively.

DWScript 2.2 preview 3

A source archive file for DWS 2.2 preview 3 (231 kB)  is now available. This is essentially just a zip file (7zip actually) for those not using the SVN.

Changes since the last post are rather limited:

  • built-in “QuotedStr” function now accepts a second quoteChar parameter.
  • improved compiler robustness (keeps parsing and reporting more errors in more cases), clarified some compile errors.
  • improved unit tests coverage (84.6%).

Further changes since the last archive (preview 2) are listed in the following posts:

 

Delphi 64 beta official after all

Did the attention that my little April 1st post drew help set things in motion a little earlier than planned?

It’ll be denied, it wasn’t seen, and it can’t be proven, it’s just that the slides and the video look a bit rushed, but anyway, on a just released Delphi 64 sneak preview page on the Embarcadero website, there  is a now a “join the beta” link, were you can apply for the beta. However the beta isn’t open, and Delphi XE users will apparently have priority.

As for the preview keypoints themselves, Marco Cantu has an executive summary.

It seems the beta will be under the usual NDA terms, so it may be some more time before more details filter out.