The next release will introduce “Traits” into Essence#

Seminal paper on Traits: Traits: Composable Units of Behaviour.

Traits are even more useful, and more needed, in Essence# than they would be in a typical programming language because of Essence#’s primary mission: interoperability with other languages, and especially with the .Net Base Class Library.  That’s because the .Net BCL was designed and implemented for statically-typed languages, where it is often either impossible or greatly inconvenient to use a common inheritance hierarchy for conceptually similar constructs. Traits provide the right mechanism to rectify that flaw. They also make it easier to provide an identical API for both native Essence# objects and for those provided by the .Net BCL.

Advertisements

I’m currently implementing Exceptions….

… and I just got the following test script to run correctly:

es -n CLR.System -d “[nil zork] on: Exception do: [:ex | Console writeLine: ex printString]”

It produces the following output:

System.MissingMemberException: Message not understood: UndefinedObject instances
do not know how to respond to the message ‘zork’
at EssenceSharp.Runtime.ESKernel.throwMessageNotUnderstood(ESBehavior esClass
, ESMessage message) in c:\Users\Strategesis\Documents\Visual Studio 2013\Projec
ts\Essence Sharp\Source\Runtime\ESKernel.cs:line 1804
at CallSite.Target(Closure , CallSite , Object )
at lambda_method(Closure )
at CallSite.Target(Closure , CallSite , Object , Object , Object )

[nil zork] on: Exception do: [:ex | Console writeLine: ex printString] => { Console}