New Release of Essence#: “Philemon” (Alpha Build 17)

The “Philemon” release can be downloaded from the Essence# site on CodePlex (which gets you the installer.) Alternatively, the code for the run time system (written in C#) can be obtained from theEssence# CodePlex site using Git, and the code for the Essence# Standard Library can be obtained from GitHub. And the example scripts can also be downloaded from the Scripts repository on GitHub.

The new release introduces preliminary support for reading and writing files, and for doing other file system operations. Specifically, the Standard Library now includes Essence# classes that “wrap” or represent all the core classes in the .Net BCL that deal with files and the file system.

The release also includes bug fixes, and changes to make Essence# more compliant with the ANSI Smalltalk Standard. However, the changes made for greater ANSI Smalltalk compatibility are relatively esoteric/obscure, so you aren’t likely to notice them. For example, it is now a syntax error for the pseudo-variable “super” to be used without sending it a message.

Finally, the release changes the format of Essence# class libraries (including, of course, that of the Essence#Standard Library.) The changes to the class library format will impact anyone who has written their own code using the Essence# class library format. The new format is fully explained in the CodePlex site documentation on class libraries.

Here’s what it means:

File Name Changes

Many of the file names used in the Essence# class library format have been changed:

Both “configure.namespace” and “namespace.configure” must now be named “namespace.def”. The library loader will automatically rename these files, if it encounters either of the old names. The format and semantics of this type of file remain unchanged.

Both “configure.class” and “class.configure” must now be named “class.def”. The library loader will automatically rename these files, if it encounters either of the old names. The format and semantics of this type of file remain unchanged.

Both “configure.metaclass” and “metaclass.configure” must now be named “metaclass.def”. The library loaderwill automatically rename these files, if it encounters either of the old names. The format and semantics of this type of file remain unchanged.

Both “configure.trait” and “trait.configure” must now be named “trait.def”. The library loader will automatically rename these files, if it encounters either of the old names. The format and semantics of this type of file remain unchanged.

Both “configure.classTrait” and “classTrait.configure” must now be named “classTrait.def”. The library loader will automatically rename these files, if it encounters either of the old names. The format and semantics of this type of file remain unchanged.

The file “instance.methods” must now be named “methods.instance.” The library loader will automatically rename “instance.methods” to “methods.instance”, if it encounters it. The format and semantics of this type of file remain unchanged.

The file “class.methods” must now be named “methods.class.” The library loader will automatically rename “class.methods” to “methods.class”, if it encounters it. The format and semantics of this type of file remain unchanged.

Format Changes

The files “initialize.class,” “class.initialize,” “initialize.metaclass” and “metaclass.initialize” must now be named “initializer”–which means that the distinction between class and metaclass initialization is now gone. The library loader will not automatically rename any of these files because the internal format has changed (although the “initializer” file still has the same function and purpose.) However, if the library loader encounters any files named “initialize.class,” “class.initialize,” “initialize.metaclass” or “metaclass.initialize”, it reports them (including their location) to the Console.

Unlike the “.def” files, and unlike the “methods.instance” and “methods.class” files, the new “initializer” file does not use self expression format. It uses “Do It” syntax instead–the same syntax used in a “Do It,” in an Essence# script, or in a block. However, like before, the pseudo-variable “self” is bound to the entity being declared/defined/configured by the folder that contains the “initializer” file. Unlike before, that entity may now be a namespace or trait, in addition to being a class.

The format of the “.constant” and “.variable” files has also been changed from using self expression syntax to using “Do It” syntax. Also, the value of the constant or variable being declared/defined/initialized by a “.constant” or “.variable” file is now set based on the value of the final expression/statement in the “.constant” or “.variable” file. Therefore, any “.constant” or “.variable” files in your class libraries that use self expression syntax will cause a syntax error unless and until you change them from using self expression syntax to using “Do It” syntax, as in the following example:

"A .variable file using 'self expression' syntax"
value: 42
"A .variable file using 'Do It' syntax"
42

There is no longer any need to send the message #value: to the BindingReference that is bound to the pseudo-variable self during the execution of a “.constant” or “.variable” declaration/definition file, because the constant or variable being declared/defined by the file will be initialized to whatever value results from evaluating the final expression/statement in the file.

 

 

Leave a comment