SmartEiffel 1.0 Released
Per Wigren writes "Today SmartEiffel, the GNU Eiffel-compiler finally reached 1.0! Eiffel is a very underrated language in the free software community for some strange reason.. Hopefully this will help to gain some interest in this extremely powerful, fast, easy-to-read, easy-to-learn, almost self-debugging language!"
an implementatation of the towers of hanoi in eiffel? is it free (as in liberty?)
as perl started out great for scripting stuff and has grown, java started out with the promise of write once, run anywhere, what is eiffel's main strength according to it's developers (any users out here?)
I learned OO programming in Eiffel. It's nice and structured. Never made anything useful with it though, compiling was cumbersome (Eiffel > C > binary) and it was impossible to do any GUI stuff with the tools I had back then (95 or so).
beauty is only a light switch away
What's the amazing thing about this code and what are its faults? I can't find much info on their website. Some sample code to look at would be really nice just to get a feel for it. Is there a feature list somewhere? A comparison to C/C++/Java?
-N
I've nothing to say here...
Eifel is simply the best language I ever saw on paper, and I looked at quite a few languages for my study.
I never imagined I could ever download a free compiler to actually compile the programs I jotted down during exams.
"easy-to-read, easy-to-learn" ... and you think people who prefer perl obviscated code would really buy into something with these sorts of (negative) attributes?
come on fhqwhgads
Maybe Eiffel's underratedness has something to do with it following the functional programming paradigm? Most programmers are still used to more conventional coding. I'm not saying this is a rational argument against the language itself, but when you want to get things done, you use the tools you know best.
Then this link is for you:
http://archive.eiffel.com/eiffel/nutshell.html
Any computer program can be expressed in C... why bother with crap...
Yeah, right.. while we're going down that slope at all, any computer program can be expressed as machine code, so why bother with assembly, C, VB, or any of that? Why bother with Photoshop when you can just do stuff pixel by pixel? I think you get the point..
slashdot!=valid HTML
Also, this interesting tidbit from the comp.lang.eiffel FAQ:
(http://omicron.felk.cvut.cz/FAQ/articles/a511.htEiffel is an object-oriented programming language designed to be replete with O-O-ness (no, really). For example, their are no primitives in Eiffel, everything is an object. Eiffel also has a singly-rooted hierarchy and garbage collection (like Java) and parameterized classes like C++.
Unlike Java, Eiffel syntax was designed to also act as a specification language of sorts, including syntactic support for contract specification.
Bertrand Meyer's book Object-Oriented Software Construction explains problems in modern software development, examines how object-orientation probably could solve them, then designs such a language. This language turns out to be Eiffel (sorry for the spoiler if you intend to read this > 1000 page book).
One of the points Meyer demonstrates is how a syntax to describe groups (classes) of solutions gets fleshed out into actual software that may execute. Eiffel, being that syntax, among other things, was intended to make you think in terms of types of objects sending messages to each other to get work done.
That said, I use Java. Why? Apache's Jakarta project.
Regards,
M. Murphree
I don't know Eiffel, but I've heard of it... here's some useful links that I've found:
Why Eiffel: http://www.elj.com/eiffel/why-eiffel/
Other lins (including tutorials): http://www.cetus-links.org/oo_eiffel.html
I wonder what is meant by all of this "Design by Contract" stuff... I'm not sure yet if this is something useful, or just more buzz-buzz.
There are 10 types of people in this world, those who can count in binary and those who can't.
"functional programming paradigm" ?
Unless things have changed substantially in the last few (um) time-units-of-your-choice, Eiffel is Object Oriented, not Functional.
I've not codes much (only a few KLOC) in Eiffel, but it is a very nice language with lots of help for producing programs that run. My biggest problem with it was that it tended to be a bit on the verbose side.
The point of all these languages is, yes, to give choice to programmers on what to use. Eiffel doesn't do low level so you wouldn't want to code up a device driver in it. C doesn't do high level so mapping a design to C *could* be more work than mapping it to Eiffel. This is like asking why new cars? Lets just improve on the old ones we have. You want to be driving in a model T? A 300 ZX is a lot better :) I know the analogy isn't perfect but it's a starting point ;)
When I was at Auckland university we used to dread when the guys doing the stage 3 OO programming course got an assignment.
;)
I once saw 12 of them running the eiffel compiler each instance of which was absorbing over 100M of virtual memory on, as I recall, old DEC unix boxes...
This was back in 1993 so as you can imagine (with relatively limited amounts of RAM and VM in those days and in a relatively small and underbudgeted department) the whole system came to a grinding halt for everyone else. Heck, I couldn't even read usenet news and opening a smallish text file to edit in emacs took around 10 minutes. Which, for vi devotees, *is* unusually long even for emacs
I think they went home for the weekend to leave their compile processes running, meaning that the rest of the comp.sci facility could barely use the unix servers for the duration.
Eventually, as I recall en-masse eiffel compiler processes were *banned* and they were told to spread out their compilation processes over a few days (ie not all 12 students at once).
Since the assignments were weekly this caused problems. I believe they turned to an alternative OO language. I wasn't doing the paper so I don't know which one.
In the free world the media isn't government run; the government is media run.
Eiffel is a language with an minimal instruction set (sometimes refered to as RISC language), which is used mostly in environments that emphasize reliability and dependability. It's small instruction set (e.g. there is only one type of loop) make it easy to learn and understand but is taking away some of the fun of coding. Most of the work you put into an eiffel project is to find the right approache, because you don't have too many ways to implement stuff. Here in Europe it's used in mostly academic environments that like the grace of its simplistic approace and its 100% object oriented design.
Tradeoffs of this language are its high compilation time, as Eiffel source gets translated to C and then into a native form, the scarcity of available system libraries and the lack of dynamic features as shared objects and stuff.
If your going to invest some time in this language, a look at those open source projects might be worthwhile:
eposix - POSIX bindings for eiffel
gobo - a collection of tools and libraries to unify the development of applications on diffrent Eiffel compilers
mico/e - a CORBA ORB in Eiffel (DISCLAIMER: I am involved in the development of this project)
To learn more about Eiffel, read this and this and this and if you still have time, this.
Also, check #eiffel on freenode (irc)
Eiffel is the best,
DM
- Why is everyone gung ho on creating new programming languages.
Eiffel is not a "new programming language". It's nearly twenty years old, invented in 1985 by Betrand Meyer, and a damn well-respected language at that.Historically Eiffel has probably had more success in influencing other languages and in teaching software construction principles, than actually being used for commercial software projects, although it has seen some popularity in the finance sector. Lately, like certain other niche languages, it has seen its popularity further eroded through the emergence of Java.
Real people don't depend on "teachers" to learn.
I was going to say "Real hackers don't depend on teachers to learn languages", but that's just a very isolated special case of the general principle.
If you honestly don't know anybody using something other then COBOL, Java, or a little C++, you are horribly, horribly disconnected from several exciting communities dedicated to increasing the power of the programmer. If you don't know the why multiple languages are useful, that is a grevious flaw in your education that you need to take immediate steps to rectify, and nobody's going to do it for you but you. Moreover, I don't mean to be offensive but you're so far behind you won't even understand the explanation of why you're behind; you need to be in the position of having used a couple of languages before you can understand comparisions!
Language differences are nothing like the difference between kde and gnome; it's more like the difference between GUI and CLI.
Don't wait for someone to teach you; you can't afford to while you're competing with people like me who know at least 10 languages well and can pick up a new one in a week (and I'm nothing special). I strongly suggest you rectify your ignorance.
'Course, if you don't, and you want to keep your attitude, no skin off my nose. That much less competition for me.
(*chuckle* I wish I could see you in an interview situation where someone asks about the differences between languages and you gave your post as the answer. They might not even bother to finish the interview.)
The whole point of this is you shouldn't be waiting for somebody else to look around for you, but here's some hints anyhow. I strongly suggest you spend a few months each on Perl, Python, a functional language like Haskell, and several APIs of some sort, like wxWindows or XML parsing. That's more educational then you might even think directly, since you'll get introduced to event-driven programming (though you may have seen it in Java), handling complicated data structures in general, and a lot of other useful things, not just "XML processing" and "GUI development". All of these things have great, free tutorials online.
Java and C# are particularly interesting in this regard because they not only support dynamic class/code loading, they also support it safely and with full reflection. That's really the future.
SmartEiffel, on the other hand, takes a static, global program analysis approach to compilation and optimization. It provides almost no reflection or dynamic loading (if you compile to JVM, you may be able to rig something up). I think ultimately, that makes it a fairly unattractive choice for many applications. Even the commercial Eiffel systems only had those features retrofitted over the last few years, which probably accounts in part for the very limited success of Eiffel as a language.
SmartEiffel is a really great concept, and for some niche applications, it is very useful (I have used it for some prototyping). I would very much like to see a safe, batch-compiled language catch on for Linux system programming as an alternative to C/C++. But I just don't think SmartEiffel is it, at least not yet.
Sather started as a free subset of Eiffel but then transmuted itself into a related but very different language.
Sather had great support for procedural pre and post conditions (not the aftermarket cheezy afterthought kind of thing that some languages seem to want to adopt), class invariants that could be automatically checked on call and return of a "public" method, class based iterators (not cursor classes, but built into the class itself), constrained genericity, simple (and relatively restricted) overloading ("a + b" became a.plus(b)), unboxed objects and so on....
Without formally measuring it, I'd guess that writing three more or less equivalent programs in Java, C++ and Sather would result in Sather having the lowest LOC count and the fastest development time. Though the tradeoffs were sometimes odd, good pre/post conditions saved me huge amounts of debugging and testing time, but required quite a bit more up front thought on what those conditions were - this resulted in much better code, but sometimes required interesting amounts of redesign.
Sadly, Sather, while still available here is GNU Sather is no longer being developed or supported AFAIK. Were I more of a compiler maven I'd work on it, but I doubt my efforts as a compiler writer would improve things much.
How can something be almost self-debugging? This stupid horseshit was obviously injected into the description to generate interest in something that is otherwise unremarkable.
?-|||-----x<*))))><
People create new languages in the hope that a lucky few won't be damned to program in COBOL all of their lives.
Damn, people, can the collective computer geeks of the world *please* pick some sort of "standard" language (or at least a very small set of languages, like perhaps C++ for most things, Perl for scripts, and Tcl/Tk for GUIs)?
I personally like C. I consider myself fairly good at it. But honestly, I don't care if we decide "Everyone must code in Forth". Just *some* sort of standard. I'll learn it, and feel happy to "waste" a year mastering it, just to never have to learn another "fad" language.
I see people asking why Eiffel doesn't have more popularity - Why? I can answer that *really* simply. Because we already have too-damn-many languages to choose from!
Yes, a *FEW* choices make sense, because not every language has the same strengths and weaknesses. But really, how many people research all 250+ "major" existing languages to determine the best for each and every program they write? No one. People pick a language that has a lot of general-purpose power and flexibility, and *ONLY* deviate when their first choice literally cannot accomplish the task at hand.
Put out efforts toward making a few projects truly great, not having a huge number of mediocre projects.
Eifel also has plug in and compiler support for Microsoft's .NET initiative. It's pretty cool, actually, because although .NET does not have support for genericity in V1.0 (though it's planned for v2.0), Eifel.NET has overcome this limitation and allows for multiple inheritance and other cool stuff. Take a look here.
There's also an MSDN article.
-jerdenn
Yes there is an example in the distribution. Just go to the example directory and compile.
No - people create new languages so that they can get new grants to do something that has already been done before... :-)
actually, I was a TA in a class that used Eiffel.
Being an experienced Java programmer also,
I would say that:
You pick your set, I'll pick mine. C++ is hopefully getting ready to die. It's just not pleasant to use. I'm also waiting for the day when the world wakes up and realizes the cruel joke Larry Wall played on it with perl. While some of my most crucial application code is written in C, I've spent more time on it, and trust it far less than stuff I've thrown together in Eiffel.
At home, I've got code I rely on written in Java, Eiffel, C, Objective C, python, bourne shell, smalltalk (although the smalltalk code that I actually use the most I didn't write), tcl, scheme, etc... I've got some perl stuff, too, but I don't maintain it anymore (it asked me not to). This is just the stuff I use day-to-day, and much of it is server code I've written that just runs on its own (Java, C, python, eiffel).
So, that's my set. Anyone who disagrees, make up your own set, continue to research and find better ways to do things, and help us continue to improve computer science in general. Every time I learn a new programming language, I learn a little more about programming, and apply that knowledge to everything I do.
-- The world is watching America, and America is watching TV.
I think Eiffel's lack of success has to do with some serious problems and limitations in the early design of the language, which have only been addressed in the last few years in the main commercial Eiffel compiler. And SmartEiffel does not even implement the full, commercial Eiffel system.
I found it really good. It's about what an ideal OO programming should look like. It asks and answers lots of questions. Well written.
If I had a sig, I would put it here.
"About a little guy that lives in a blue world
.NET! Any guesses what song rights they will buy, when they launch their new standard development language?
And all day and all night and everything he sees
Is just blue
Like him inside and outside
Blue his house with a blue little window
And a blue Corvette
And everything is blue for him
And himself and everybody around
Cause he ain't got nobody to listen
I'm Blue da ba dee da ba daa
I'm Blue da ba dee da ba daa"
Well, Microsoft DOES have an Eiffel plugin for
...
According to the main Eiffel website, a major aspect of Eiffel is EiffelStudio, their "more than just an IDE" that really makes everything go. They imply that this product is necessary to reap the major benefits of developing in Eiffel, but unfortunately it is quite pricey (not to mention proprietary): the Windows or Linux version will run you $4799. That price, and hitching your wagon to a proprietary star, are major barriers to wider acceptance.
If anyone strongly believes that learning Eiffel is worth the trouble even without a good free (as in speech) IDE, please let me know.
I strongly suggest you spend a few months each on Perl, Python, a functional language like Haskell, and several APIs of some sort, like wxWindows or XML parsing.
I agree totally. I just wanted to chime in and say that while you're out checking out new languages, give Ruby a try. It's a beautful language that falls in the same family as Perl and Python but has it's own charm all the same. I use it for all of my development in an environmental lab, and it's served me quite well.
If you want to explore functional programming, you also may want to check out SML.
There are several free implementations available, and it's easy to learn. It's very fast and quite powerful for a variety of tasks. Last but not least, check out ANSI Lisp or at least Scheme. Everybody serious programmer should know at least one dialect of Lisp because it's the original hackers language.
I believe ESR did a rant somewhere on how to become a real programmer or something along those lines. Google could probably dig it up rather quickly. It's worth a read as he outlines languages to learn to explore the various development methodologies(functional, OOP, procedural, etc).
A musician without the RIAA, is like a fish without a bicycle.
He derives all the properties of Eiffel from first principles, convincing you that everything has to be this way or it would be a big mess. But then, you find out that Eiffel has this problem of CATcalls, ie changing availability of typos or something, and thus Eiffel also has serious skeletons in the closet down where it smells bad. Is he the Goedel of software? You be the judge.
The wxEiffel GUI library provides a comprehensive interface to the wxWindows GUI. Database interfaces to Firebird, sqlite, berkeley db, mysql, postgres.
There are even libraries for Regular Expressions and for those who like the perl way of doing things - see Perlish.
The 0.5 release announcement in comp.os.linux.announce gives more details. The ELJ project is undertaking the necessary work to move from SmallEiffel to SmartEiffel.
There are many other open source Eiffel projects:
Eiffel has come a long way over the years. Misconceptions still abound. You can now develop multiplatform applications using open source Eiffel tools and libraries. There are small hurdles to jump as there are with anything. Give it a try and become involved if there is something about Eiffel which you find appealing.
Eiffel has been around for about 17 years, so a lot of people who used it a long time ago and haven't used it since moan about old problems with the language THAT SIMPLY DON'T APPLY MORE. Here is an up to date list of cool things about Eiffel:
.NET language. Eiffel Software have made a Visual Studio plug-in, and EiffelStudio (previously EiffelBench, or EBench) can also be used to make .NET or non-.NET applications.
.NET implementation of Eiffel adds some programming mechanisms that are NOT available in Java, C#, C++. Namely these are multiple inheritance of classes, genericity (true generics), design by contract (pre- and post- conditions/assertation to improve software reliabilty and greatly ease the debugging process).
.NET plug-in) from there web site.
- Compilation is not so slow anymore.
- It a full
- EiffelStudio is the IDE for creating Eiffel applications was COMPLETELY REWRITTEN a couple of years ago, so previous uses of EiffelBench won't recognise it anymore. The new studio is better in every respect and has the best class browsing facilities you will find in any IDE ANYWHERE (I'm not kidding).
- EiffelStudio was written using Eiffel Software's Vision2 library - a 100% platform independent library meaning it is identical on Windows and *nix platforms. You can use Vision2 to make your own cross-platform interfaces with real ease.
- The
- Eiffel Software provide a FREE version of EiffelStudio and Envision! (the
There's loads more to this language, but aint got time to talk about it, so just check it out yourself.
Rake Free + Mac Poker: CardCrusade
> Some features of Eiffel are debatable, one of which is covariance for parameters: This means that if you override a method in
It's good that you mention it, but I wouldn't say this "feature" is debatable, it's just wrong. The only way they can recover static safety with this bug is to do whole-program analysis! If they really want to take a structured and pure OO approach to programming, I think it's important to have a consistent theory, not to just provide features that "seem" to be intuitively useful. (But have some serious consequences...)
FWIW, Java makes a similar mistake in treating [] as a covariant type constructor. This means that in general they have to do dynamic class checks on every array access! Eiffel is mostly a better-designed language than Java, in my opinion.
So does Ada, APL, C++, J++, Java, Perl, PL/I, Set-L, and Simula (used them all & Basic, C, COBOL, JCL [I know, that doesn't realy count] & RPG,) and a whole bunch of language I have only seen the EBNFs for. (Okay Occam was & is in a class by itself. It must get lonely)
Now Smalltalk ain't perfect. It has a few major blind spots (specially concerning object relationships and instatiation in context,) but it has everythig else beat.
Try Squeak ( http://www.squeak.org ) and once you , uh, "get it," come back to anything else... You'll go YUCK!
MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
No joke, Mr. "AC". Evildoers is about right, and I'm using a real username to say so (where do YOU work, eh?).
I can't find the link for it but frankly I think Eiffel# has sold out and made some very disturbing concessions that cripple the language. From the looks of things, any # version is going to be a one-off of C# (the only truly native # language), and it's pretty much a one-way path to migrate users of language X to C# itself (especially as they will have to use C# libraries to do much useful work, and calls form most other languages are going to be more awkward). When I read of Bertrand Meyer's support of Eiffel# months ago, my first thought was "that's a shame, I rather liked Eiffel. Too bad it has to die this way".
Calling a spade a spade does not make one bratty, to borrow your acidic parlance.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
If you're going to code in SmartEiffel, you should try using TinyCC instead of GCC while developing! TinyCC is an extremly fast and memoryefficient ANSI-C compiler that is 100% compatible with SmartEiffel! TCC generates code which is about as fast as "gcc -O2", but compiles almost 1000 times faster than "gcc -O2"!! I know these figures look unbelievable, but they are authentic! Just try it yourself if you don't believe it!
oggy gexace # time gcc -O2 -o gexace-gcc gexace.c
real 10m12.746s
user 9m33.227s
sys 0m4.897s
oggy gexace # time tcc -o gexace-tcc gexace.c
real 0m1.353s
user 0m0.472s
sys 0m0.061s
oggy gexace # ls -l gexace-*
-rwxr-xr-x 1 root root 1216938 Nov 29 18:27 gexace-gcc
-rwxr-xr-x 1 root root 994200 Nov 29 18:27 gexace-tcc
The gexace.c examplefile is from GOBO, generated by SmartEiffel and is about 2MB...
When your program is ready to be distributed you can compile it using "gcc -O3 -mcpu=i686 -fomit-frame-pointer -ffast-math" or similar to make it run ~10% faster, but compilation may take hours instead of seconds...
My other account has a 3-digit UID.
limited generics in a way that C++ can't even try to approach.
Can't believe a five-digit user number is trolling, so could you expand on this point, por favor?
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
I don't want to compile something in to C and then into object code. Why not an eiffel front end for GCC?
This may be of interest to you.. html
http://www.info.uni-karlsruhe.de/~sather/dl
I can't say how much development is being done on this as my German is very basic but it doesn't seem to be a dead project.
Pain is merely failure leaving the body
It's about learning a new point of view, it's about expanding your horizon.
I don't use Eiffel, but learning it taught me some concepts I didn't know before.
And that's why we need even more new languages. Life (and work) is about learning. If you stop trying to learn you might as well drop dead.
The free version of Eiffel Studio for linux is available here.
This is an example of an extremely well written Gtk application and provides gtk bindings as well as multi-platform libraries that allow applications to run on, if forced to, Windows with absolutely no change of code yet retaining full platform look and feel. Very cool stuff indeed
-- You see what happens when you have fun with a stranger in the Alps?
more french bashing by (i assume) an american poster which is moderated up on a site which has a largely american readership
why is this constant painting of the french as cowards so supported by americans? is it perhaps because france is one of the few countries that doesn't kow-tow to american imperialism?
i try to seperate the actions of the american government from the general american ppl, believing that they are as much victims of the corrupt machinations of the said government as the rest of the world, however constant puerile slandering of non-americans such as this causes me difficulty in maintaining my discrimination
in case you were wondering : i am australian of anglo-saxon cultural background
While trying to, in any way to be a prick... Why is Eiffel cool? Where would it be an alternative to Java/C++? Serious replies (if any) please...
You forgot the "HUH...Good God, y'all!"
Damn that's a lot of typing!
For a nice IDE for Eiffel you should get the Eiffel extension for the SNiFF+ environment
http://www.willamowius.de/eiffel.html
There are free versions of SNiFF+ for projects up to 200 (?) classes which should be ok for starters.
It's exactly the opposite in fact! ObjC is weakly typed, Eiffel is strongly typed. And the added safety of DbC makes it even more so...
Presumably that generic can only be used with shape or derived classes. That way when you call foo you know you're getting an override of shape's foo rather than some unrelated method with the same signature.
You like C, but not C++? Bwaaa haaha ahhaa ahaaa.
I don't like C, but I occasionally write apps in it. I don't mind objective C. I don't understand why someone must like C++ just to like C, though.
-- The world is watching America, and America is watching TV.
If you write large scale programs in C, you'll eventually find yourself inventing ways to handle things that the C++ language does for you. C++ does them better and makes it easier on the programmer.
If you're just writing small things in C, you can always do the same thing in C++ (almost a superset, and all), but even there, C++ provides some features that can make some small programs much easier to do.
XML causes global warming.
Last time I checked (years ago), the Eiffel's garbage collector didn't handle objects shared between different threads.
Does anyone know whether this was fixed and/or how what SmartEiffel's garbage collector is like?
Rocky J. Squirrel
For a "modern", safe language, SmartEiffel produces very fast code. I don't know of any other imperative language other than C and C++ that beats it.
May we never see th
If you're trying to churn out useful software and not do research and want to learn ML, you may prefer Objective Caml to SML.
I really *hate* type inference, as it makes debugging a pain, and SML/NJ, the SML I learned on, has absolutely atrocious error reporting.
On the up side, it's quite an eye opener if you've never used a language with really strong typing.
May we never see th
This is very true.
If we went by the "hello world metric", Perl would probably be consider the best of all programming languages.
From what I've heard, the majority of eiffel developers do very large software applications.
May we never see th
vector <Shape> coll;
declares a variable called "coll", that contains a vector which can only contain objects of type "Shape". It does not allow any object that has the same methods as "Shape" to be included, just ones that are actually derived from "Shape".
Now there's a language that needs a .net binding. But even so there are others that need integration with .net first. Primary among these (of course) must be INTERCAL especially the revised version with the "COME FROM" statement.
Because it is fun, mostly. But also because different languages shape our thoughts in different ways, and can be used for different purposes.
What the hell is point of all these languages.
Solving problems. See above.
I'm still learning cobol in college right now. I'm off to Java next, and will barely learn C++.
Good for you! You have already decided to stop learning once you are out of college. I applaud your decision, please remember to tell any future employer this before he hires you, so he can save your salary!
This is like gnome and kde, and for everyone who's gung ho about replying "these are what gives us choice ", free is free people the only thing different between kde and gnome is the developers, they're all just trying to be another mac os/windows clone.
No, they don't. Wine is trying to be a windows clone. While most of GTK and Qt is obviously inspired by other WIMP-environments, that doesn't mean that they are trying to be windows clones.
Actually, you can judge a language from it's "Hello World." The books How to Think like a Computer Scientist comment on this as well, not that I endorse those books.
;; lisp
A "Hello World" program demonstrates very clearly how "simple" a language is. How much syntax and how much structure you have to use to get even the simplest of things accomplished. It also usually demonstrates the difference between an optionally interpreted language and a purely compiled one, as compiled languages, on average, tend to require use of more syntax to get up and running.
As an example, Java.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
It's hello world program involves both a class definition and a method definition. Neither of these things are relavent to the goal of printing a string, but Java makes you go through the motions anyway. Java forces you to use OO for even the simplest of problems, and this much is evident from looking at it's solution to the simplest of problems, printing a string.
Perl, Python and other optionally-interpreted languages tend to be far simpler to bootstrap, allowing for things such as:
print "Hello World!"
However, this syntax makes you use a function to print the string, evidence of an imperative language rather than a functional one in this case. Although, to be fair, Python is very 'functional' and actually can do without the print statement. In a functional language in which you deal with expressions rather than statements, all values are self-evaluating and allow for "code" like the following in most functional languages:
"Hello World."
This string, being a value, evaluates to itself in most functional languages including, Python, Lisp and others, and results in the value being displayed back to you. If you want to be pragmatic about it, as this code won't do anything if compiled in a functional language (most of 'em anyway), you can change it to something like:
(princ "Hello World")
or
print 'Hello World' # python
This throws back to the notion of function calls, which are evidence of compilation in the case or most functional languages.
You can learn a lot about a language from looking at it's Hello World. Mainly it simplicity, or lack there-of in the case of languages like Java or, yes, Eiffel.
Eiffel makes you digest concepts like class creation and features (methods in this case), along with a whole lot of syntax, to accomplish the simple goal of printing a string.
The main problem with any syntax being forced on you, aside from making it more difficult to parse, is that it limits the languages flexibility in a practical rather than theoretical sense. You could practically never write a macro system as astoundingly powerful as the one found in most Lisp dialects in a language like Java or Eiffel. Too much syntax. Not enough closure.
While having a lot of required syntax won't prevent a language from being good at real-world tasks, in fact quite the contrary for reasons I won't go into here, it does limit it's simplicity and, in my mind, beauty.
Justin Dubs
Why should we use it? ..dare I say.. mainstream? There are plenty of languages out there with plenty of advantages and applications but what does this bring to the table? Do any of you think this will be the next c/perl/php/?
Im not trying to be a smartass by any means, or discredit the "ease-of-use" etc etc. I program in c (Windows and Linux) because it is widely used, and widely supported. Will this become
I have acorns.
One possible reason might be (correct me if I'm wrong) that for a long time, Eiffel was supported by a single vendor with a closed-source, commercial, proprietary compiler. Who is going to commit to a brand new programming language with a single vendor?
From this point of view, an open-source compiler is ideal. Perl and Python are effectively single-vendor (i.e. single development team) but at no risk.
Aside: at the time (commercial) Eiffel first appeared, we were working on a Standard ML language and compiler (in fact there were several different development teams building compilers, since the language had a formal semantics and definition). The New Jersey compiler was open-source from the start (around, oh, 1987?), and was self-compiling, generating native code for 680x0, Alpha, Vax and Mips architectures.
This was around the time that OO programming was getting trendy, and SML, despite being very-high-level, strongly-typed, memory-managed, having a superb modules system etc., wasn't really OO and so fell out of fashion. It's still around, though, and still being developed (see the link above).
Suppose you wanted a homogenous collection that's aware of the semantics of class shape. bounding_box<rectangle> and bounding_box<ellipse> should be allowed but bounding_box<company> should not, even if they all happen to have location() and size() methods. In C++ you can't specify that instantiating the template for a class that isn't derived from shape is an error, without some ugly circumlocutions.
template
class ShapeArray
{
};
--
Two witches watched two watches.
Which witch watched which watch?
template <bounding_box<shape> T>
class Bar
{
};
--
Two witches watched two watches.
Which witch watched which watch?
Should be:
template <shape T>
class ShapeArray
{
};
--
Two witches watched two watches.
Which witch watched which watch?
One problem with a niche programming language is finding good documentation for it. Is there a good resource that tell you everthing you want to know about the language? Preferably online & free (beer), since there's almost zero chance of ever using it on a job.
Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
That doesn't do anything to prevent you from instantiating bounding_box<company>.
Sure the Eiffel coders did better. But that's a self selecting sample right?
;).
It's likely that the average befunge programmer would do better than the average programmer on many tasks, but that doesn't make befunge a good language
Yeah Eiffel sounds good. Design by Contract sounds good - independent ways of constraining what a program can do = higher chance of it doing what it's supposed to do and only that.