|
ELENA Programming Language: ELENA vs. C
Alex Rakov, Sep 2009
Sometimes it is easier for the people to learn something new in comparison with something well-known. C (or C++, it does not matter for this article) is one of the most popular languages and its syntax is considered by many as a default standard (just look at C# or Java). ELENA in its turn was inspired by SmallTalk and toke some syntax features from it (though one can easily find C-syntax elements as well) which are not so fimilar. So let us consider them side by side on the base of the BF interpreter. DisclaimerBefore start let me say that it is in no way an attempt to find who is better or worse. Of course C is one of the most successful language in the computer history, ELENA is hardly known. But the most important thing is the fact that they are ideologically completely different languages. C is a procedural language and ELENA is a pure object-oriented one. They work on the different abstract levels and in any real system ELENA(because of its frame nature) should control the code written with C. The purpose of this article is to illustrate sometimes complicated ELENA constructions in compare with C simple ones. Program structureC program usually consists of the source and header files. Header is used mostly for the forward declarations and could be used in different source files. ELENA program consists only of source files (with the extension ".l"). There is no need in forward declarations because any external class could be accessed by reference and may not even exists on the moment of the source file compilation (except the inheritance cases).
To be continued
Copyright (c) Alex Rakov, 2006-2009 ELENA Home |
|
|