PDA

View Full Version : Eiffel



kryton9
12-08-2008, 05:12
With all the new news coming out from PowerBasic about Objects, I thought it might be interesting to post this link to a language that has been around awhile, but recently seems to be coming up in my searches and resulting pages. I decided to look into it more tonight and was surprised by the very clean syntax and that it supports multiple inheritance. It has a visual designer and has been used in making commercial games as well.

This site gives a very nice overview of the language and its main features. The clean syntax and powerful features might be of interest to many here.
http://eiffelzone.com/doc/into-eiffel.html

This site has much more detail in an easy to find way:
http://www.cetus-links.org/oo_eiffel.html

Michael Hartlef
12-08-2008, 05:24
Thanks Kent,

now that I got my IMac yesterday I'm of course interested in languages that I can use on it. Thanks for the link.

Michael

kryton9
12-08-2008, 05:26
Mike, yes I am jealous in reading what you will have access to but also happy and hope you find it interesting as it seems to be. Congrats on your iMac purchase! (I drool)

Here is a great read written by the creator of Eiffel comparing it with c++. This is really a fun read and being a professor he has a nice writing style that is very clear and understandable.

http://groups.google.com/group/comp.lang.eiffel/msg/7c7258166aa421c8

Charles Pegge
12-08-2008, 07:36
Hi Kent,
That was excellent food for thought. Quite a few of the Eiffel concepts are applicable to low level coding. Concepts like uniform access, and design by contract. The very flexible modes of inheritance are interesting too. However judging by the number of broken links on these sites and the purchase price $5999 for Eiffel Studio from Eiffel.com - it does not seem to be going for the popular market. It may be left to other languages (and Microsoft!) to assimilate the Eiffel paradigm.

kryton9
12-08-2008, 09:37
Charles, they have gpl versions of everything. If you want to sell and protect your code, then yes $5000.

Here is an article about it that is pretty recent compared to some of the other links. What is amazing is the first stuff I was reading was in the late 1980's to early 1990's and it sounded like a dream language for today. I was amazed when I noticed the dates and then to see it was developed in mid 1980's.

This article really points out its strengths in modern terms.
http://www.kuro5hin.org/story/2006/10/31/20640/115

Petr Schreiber
12-08-2008, 09:55
Hi Kent,

sell and protect ... do you mean when I want to do programming for living I have to pay $5999 for win and $8999 for unix ?
This is a bit extreme, probably not problem for big company, but for starting developer it is overkill.

At least it does not have semicolons :)
Syntax is not bad, but I do not like end of block without block type specifier - big annoyer in C/C++/C#.
It is nice there is module for OpenGL for it.


Petr

Charles Pegge
12-08-2008, 11:11
How much of Eiffel can be absorbed into BASIC?

I like the flexible inheritance where you can define elements generically or specifically, and add alter or remove elements. You are no longer constrained by a rigid taxonomic tree.

Then there's this:

Eiffel contracts:


...The first major benefit is AutoTest. This is a new system (still being developed, but very functional already) that uses contracts as test oracles for completely automated randomised testing. You push a button and walk away, and AutoTest will fully exercise your code with randomised tests and provide you with a simple report of what went wrong.

kryton9
12-08-2008, 21:26
Hi Kent,

sell and protect ... do you mean when I want to do programming for living I have to pay $5999 for win and $8999 for unix ?
This is a bit extreme, probably not problem for big company, but for starting developer it is overkill.

At least it does not have semicolons :)
Syntax is not bad, but I do not like end of block without block type specifier - big annoyer in C/C++/C#.
It is nice there is module for OpenGL for it.


Petr



Petr, yes the price is extreme, and as I have now read the real benefits besides being a very nice language is when it is used in Huge Projects. Then it really shines it seems, so I guess they figure those type of projects these prices are nothing.

Like Charles said, it is probably better for us to study it and perhaps not end up developing in it (because of very expensive price for small developer), but to get ideas from it.

There are also other projects spawned off of eiffel. These are languages it seems developed by those who studied Eiffel in University then developed for thesis further steps. I haven't gotten into those languages yet.

I downloaded and installed Visual Eiffel last night. I am just reading the documents now, but you basically prototype your application and that prototype is then fleshed out into an application. There is not Main(), you specify which class and method is the root one to execute, I thought that was neat. You have small classes that are individual working units, you organize these into clusters. All very cool ideas so far.

Here is Sather, one such language spawned from Eiffel:
http://www.icsi.berkeley.edu/~sather/

kryton9
12-08-2008, 21:45
Some other cool features.

Concurrency
The classes can have pre and post conditions in the classes themselves, this is so logical, I am surprised I had not seen it before.
With multiple cores you hear about Erlang for concurrency, but Eiffel has it and I think is a much much more readable language than Erlang.

Sather optimized compiled outperforms C++. When not optimized compiled is slower than C++.
C if hand optimized can match or slightly surpass optimized Sather compile, but being had done can be error prone and of course time consuming.

kryton9
13-08-2008, 22:45
Here is a neat language comparison site:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all

freepascal and smarteiffel perform well it seems just behind c/c++

jack
14-08-2008, 00:36
FreePascal it's not bad, after seeing your post I went to the FreePascal site and downloaded the newest version 2.2.2 released 2 days ago.

kryton9
14-08-2008, 00:44
Smart Eiffel is a free version that is different than standard Eiffel and will be even more so in the future.

I downloaded it and it is console based. You write code in a text editor and compile from the command line via the console window.
It does have a library for graphics named vision. Within vision is opengl.

for instance to compile the source code file helloWorld.e
you would type in se c helloWorld
this compiles and also creates c code and header files.
if you want to get rid of these files you then type:
clean helloWorld

If you are done editing and testing your source and want to do a final compile you type
se c -boost -no_split -O3 helloWorld

This reduced my final exe by about 30kb.

emacs and vim have syntax highlighting apparently for smart eiffel.

I just wanted to post this for those interested in eiffel and not wanting to worry about very expensive license's.
http://smarteiffel.loria.fr/

you can compile to c or java so that is cool too.

kryton9
14-08-2008, 00:48
FreePascal it's not bad, after seeing your post I went to the FreePascal site and downloaded the newest version 2.2.2 released 2 days ago.


Jack you might want to download lazarus, it is very nice IDE for freepascal. You can also get it bundled with certain libraries if for instance you want to use glscene then you can download a bundle with lazarus, freepascal and all that glscene requires.
you can do searched in google looking for different combos once you decide what you might need.
Here is the result of search for lazarus glscene:
http://www.google.com/search?hl=en&q=lazarus+glscene&btnG=Google+Search

jack
14-08-2008, 01:27
yes, Lazarus is OK, had a problem compiling some examples, the fp.cfg file had the wrong compiler option -OPentium3 when it should be -OP3 after changing that it works.
now to download Lazarus :)

ErosOlmi
14-08-2008, 06:01
Please remain on topic. If you want to talk about freepascal, please open a new thread.
If there is interest, I can even create a new forum dedicated to freepascal.

Let me know.
Eros

kryton9
14-08-2008, 11:29
Update on smart eiffel tests. I could compile and run the console based apps. I could compile the opengl apps, but they didn't seem to run and output errors into the console window. I did some digging and it seems the new smart eiffel version doesn't work with the opengl. Very little information so I am not sure.

I am done with these tests. Lots of great ideas in these languages. I am sure future language developers will build and hopefully the next big language will have some of these features.