Better HN
topnewbestaskshowjobs
Log inSign up

arakov

6 karma · joined Sep 7, 2015 (11y ago) · 15 submissions

Submissions

comment 6y ago · link · parent

I know there are problems with destructors. That's why I didn't implement them yet. But in C# they do exist. And after all you may always use explicit finalizers. I don't think that it makes the concept of obligate-GC invalid.

But after all I don't care much. I'm more interested in other parts of language designs :)

comment 6y ago · link · parent

as much as I can see, Rust is a special case. So I mean most of the modern languages. After all I consider C++ modern as well :)

comment 6y ago · link · parent

A first class message is similar to the function to invoke this message. So it is just a special case of first class function. I uses first class messages to implement a dynamic record - http://www.rosettacode.org/wiki/Dynamic_variable_names#Elena

comment 6y ago · link · parent

But it is much more fun to design VM yourself. I could not resist

comment 6y ago · link · parent

I can't imagine a modern language without GC. So yes, it has. Destructors are not yet implemented,though I do plan them.

6.

Elena 5.0 Is Out(reddit.com ↗)

3 points · by arakov · 6y ago · discuss

7.

First class messages in ELENA Programming Language(reddit.com ↗)

4 points · by arakov · 6y ago · discuss

8.

Elena Programming Manual(github.com ↗)

1 points · by arakov · 7y ago · discuss

9.

Elena 4.1 Is Out(elenalang.sourceforge.net ↗)

2 points · by arakov · 7y ago · discuss

10.

Building code at run-time in ELENA, Part 2(github.com ↗)

1 points · by arakov · 7y ago · discuss

11.

Building code at run-time in ELENA, Part 1(github.com ↗)

1 points · by arakov · 7y ago · discuss

12.

Elena 4.0.3 Is Out(github.com ↗)

1 points · by arakov · 7y ago · discuss

13.

Introducing ELENA 4.0(reddit.com ↗)

1 points · by arakov · 7y ago · discuss

14.

ELENA Programming Language(github.com ↗)

1 points · by arakov · 8y ago · discuss

comment 11y ago · link · parent

ELENA is a general-purpose, object-oriented, polymorphic language with late binding. It features message dispatching / manipulation, dynamic object mutation, a script engine / interpreter and group object support.

The main way to interact with objects in ELENA is sending a message. The message name is structured and consists of a verb, a signature and a parameter counter. The verb defines a message action, for example read or write some data. There are only limited set of possible verbs. The signature is user defined and describes the message parameters. If the signature is not provided the message is considered to be generic and can be qualified (by dispatching).

If the object wants to handle the message it has to contain the method with the same name. If no method mapping was found the flow is considered to be broken and the control goes to the next alternative flow (exception handler) or the program is stopped. It is possible to declare generic handler which will be called for all incoming messages.

A class encapsulates data (fields) with code (methods) to access it. It is not possible to get a direct access to the class content.

To work with the class we have to create its instance with the help of the special methods - constructors.

There are special type of classes which do not have fields and constructors and can be used directly (extensions / symbols).

Classes form the inheritance tree. There is the common super class - system'Object. ELENA does not support multiple inheritance, though it is possible to inherit the code using redirect handler (so called "horizontal inheritance"). When the parent is not provided the class inherits directly system'Object.