Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
News

Eiffel As a Learning Language? 20

SnowSquirrel asks: "My second year university comp sci class is using Eiffel as the programming language. I won't start the class for a couple of days yet, so I don't know much about the language, other than the fact that I had never heard of it until a month ago. I wouldn't mind some opinions from the relevant masses on whether Eiffel is a good language to use for 2nd year college courses (the 1st year we used Java)."
This discussion has been archived. No new comments can be posted.

Eiffel As a Learning Language?

Comments Filter:
  • I really liked Eiffel when I was in school (way back in the '80s). But after reading this article and others, I was forced to conclude that Bertrand Meyer is a complete idiot.

    Read it [sdmagazine.com].

  • by smoon ( 16873 ) on Tuesday May 08, 2001 @03:37AM (#239883) Homepage
    One of the first languages I learned in College was Logo (on a 512k Mac no less). I haven't used Logo since, but I sure learned a lot about recursion. While my contemporaries were struggling with it in CS I, II, and III, I was wondering why they didn't "get it".

    I've read about Eiffel in Bertrand Meyers' book "Object Oriented Software Construction". It's a great book, but I didn't/don't have time to learn Eiffel; I wish I did.

    In college I used to whine about having to learn apparently useless things. Having been in the 'real world' for a while I've found that adapability is key. The fundamental principles don't change even though the languages and details do. Sure, right now Java is a hot thing to have on a resume, but quite frankly, you can pick up Java pretty quickly if you understand OO and have programmed in some other OO language. I would rather hire someone who is good at OO and then train them on Java or whatever technology my company happens to be using, rather than have a mediocre Java programmer that doesn't understand OOP.

  • by Lumpish Scholar ( 17107 ) on Monday May 07, 2001 @04:43PM (#239884) Homepage Journal
    Eiffel was one of the "gee, I can do better than Stroustrup" languages of the late 1980s and early 1990s, pretty much contemporary with Objective C. It may have suffered from insisting, before people were ready for it, on automatic memory management (garbage collection).

    Most interesting aspect, to my mind: You can add assertions about the state of an object. (Imagine a complex number in polar notation. The radius is always non-negative, the angle is in a certain range, if the radius is zero than the angle is too, if only by convention.) This is more then assert() from C/C++, since that state must be maintained by *any* publicly visible function. The compiler enforces this.

    This in turn supports "programming by contract": insisting that certain conditions must be true in a valid program (e.g., square root function is never passed a negative number), but that as a result, certain other conditions are guaranteed to be satisfied. This isn't automated programming proof (the pipe dream of programming languages in the late 1970s), but it works very well with formal correctness proof (supports the style both at design/code time and run time, instead of claiming testing is irrelevant).

    It didn't catch on in a big way, because ... there were *so* many languages trying to catch on, and only a very few (C++, Perl, VB, eventually Java) could gather a critical mass. Part marketing, part competition, part survival of the fittest, part pure luck.
  • When I was at RIT we used Eiffel for the first year or two of CS classes. I have no regrets with learning it.



    All considered Eiffel is a great vehicle to learn object oriented concepts. The advantages it has over Java boil down to a holy war. It's strong integration of programming by contract makes it an excellent academic language.



    You'll likely never see Eiffel in industry in the states, but I'm told it's a little more common in Europe.



    The fact that one generally has to learn more than one language that fits a programming paradigm to understand the full implications of the paradigm gives Eiffel more clout. Odds are you're going to learn Java, C++ or Small Talk in industry, so you might as well learn in academia what you're only going to learn in academia.


  • Nothing against java, but it doesn't seem to be the easiest language for beginners to pick up. To even write "hello world" there's a lot of apparently meaninless, arbitrary voodoo stuff. And with it's painfully limited (compared to C/C++) console handling.

    Actually, Java's a very good introductory language. It's a typed language that doesn't make you worry about pointer syntax and arithmatic. It's an easy framework for learning the difference between pass-by-copy vs. pass-by-reference. It has string data types and very simple string manipulation features. It's OO system is very, very smooth and easy to learn compared to languages like C++ or Perl. It has a great library that allows for easy, care-free introduction to event-driven GUI programming. It also provides the beginnings of a smooth transition into C/C++ later in life. Finally, the console handling (that an introductory class would do) is equivalent to C, only it has a slightly simpler syntax. Of course, I'm biased. It's what I first started with.

    Oh, and "Hello world" is no worse in Java than in C. (I had an example, but the stupid lameness filter wouldn't let it pass. Here's [ucsc.edu] a good simple example.)

    So, after the students have gone through the trudgery of learning Java as their first language, why would you switch over to another? I see two ways for this to turn out : students are either forced to go out unprepared to program in the language, and learn as they go/on their own time, or covering of the basics of the language will take up the first half of the class...

    So, what's so great about Eifel that it's worth throwing away the student's familiarity w/ Java?


    Well, at any good program, this should only take a week or two to introduce how the syntax for doing a task works in this language with a few classes thrown in later to introduce new concepts, such as contracts in Eiffel.

    A lot of programs go over a few of the necessary basics of OO when teaching Java, but they need to teach a full OOA/OOD class later. When this happens, it's good to get a clean break with your old bad inexperience programmer habits by forcing you to learn a new language. Later, when they come back to the old language, they will see their coding flaws much easier than if they had been entangled in them the whole time.

    Plus, any good program needs to have as many languages as possible in their curriculum. The more languages you are exposed to, the easier it is to pick up new languages. In fact, such a program should have a whole class dedicated to the evolution of programming languages. Any program that teaches a language as the subject of a class is robbing their students. A program that teaches programming concepts should create students who can pick up any new language in less than two weeks, while those that spend all their time on a language will produce weak programmers who don't understand how to think at a higher level beyond their basic language. This is the difference between an institution of higher learning and a glorified trade school.

    A good program should expose students to OO, functional, and low-level procedural code. If you can't think in more than one toolset, then you are limited by what those tools can do.

    You see, it's not that Eiffel is such a great language that it's "worth throwing away the student's familiarity w/ Java." Learning Eiffel will actually help these students to be better Java programmers by exposing them to ways of thought beyond what they learned in their very first programming class.
  • SML is pretty standard for intro CS classes.

    It's part of one [sunysb.edu] of the classes I'm taking right now, actually.

    While I found it slightly confusing at first, coming from a background of C-like programming, I can see why it's a good choice. For a student with no programming experience, SML is very close to the mathematical recursion and discrete math. That way their mathematical knowledge can transfer over pretty easily.

    It's also a nice way to learn functional programming.


    ---harlan
  • 1. Eiffel is better than C or C++
    2. Learn several languages with different concepts
    3. Also learn <A HREF="http://squeak.org/">Smalltalk</A>
  • by Gholam ( 115105 ) on Monday May 07, 2001 @04:38PM (#239889) Homepage
    Yes, I can say that eiffel is a fantastic language for teaching the principles of object-oriented programming.

    I've done a lot of C/C++ programming, and a little bit of Java, but I haven't seen a clearer or more well-defined language. (We're studying it as a first year programming subject)

    The features offered by Eiffel include:
    * clean, english-like code
    * promotes documentation of code, through commenting
    * promotes standard of design (some Perl programmer would say this is limiting, but it's great for beginners)
    * incredibly simple OO approach - even complex ideas like multiple inheritance and generic classes are implemented cleanly.

    In short, I'd say Eiffel is the ideal language to teach beginner programmers, since the OO approach is the industry standard. Perhaps it wouldn't be suitable after studying Java, but what you don't learn in Java about the principles of good design, you can learn with Eiffel.

    A final note: Based on the two distributions of Eiffel I've tried, there is a marked difference in standard syntax, even for basic I/O. I use SmallEiffel, and have found that the most consistent, and fully-featured.

    Good luck!
  • So, after the students have gone through the trudgery of learning Java as their first language, why would you switch over to another

    If they are supposed to be teaching them programming they should teachthem to a new language every few months (while keeping going with one to teach bigger concepts with). However swapping between two such similar languages seems pointless. Shove 'em through prolog haskel assembler and microcode.
    _O_

  • For learning principles that really work in prgramming _large_ projects, Eiffel is excellent: Strong cohesion, loose coupling, invariants, assertions, programming by contract - all important principles that can be applied in Java or C++ (even C, but more painfully).

    As others have pointed out, the language itself is less important than the principles taught. In fact, I vaguely recall a freely available prepocessor that supported pre/post conditions in Java.
  • Or else all your code will be blue and will get annoying [eiffel65.net] after you hear it way too many times, if there is such a thing.

    --

  • Why would they start with Java, an OO language, and then move to a non-standard language for teaching OOP?

    Nothing against java, but it doesn't seem to be the easiest language for beginners to pick up. To even write "hello world" there's a lot of apparently meaninless, arbitrary voodoo stuff. And with it's painfully limited (compared to C/C++) console handling.

    So, after the students have gone through the trudgery of learning Java as their first language, why would you switch over to another? I see two ways for this to turn out : students are either forced to go out unprepared to program in the language, and learn as they go/on their own time, or covering of the basics of the language will take up the first half of the class...

    So, what's so great about Eifel that it's worth throwing away the student's familiarity w/ Java?
  • Take a look at http://www.willamowius.de/eiffel.html [willamowius.de] for a free IDE for Eiffel (actually a conversion of a C++ IDE).
  • Or MIX. WTF is up with that?

    Dancin Santa
  • But you will likely never use it in any production code. There are a lot of interesting ideas that are directly applicable to other programming languages like contracts, etc.

    Anyway, if you're just trying to get ammo against your teacher because you don't want to learn another language (or don't want to waste your time learning a language that you'll never use), you're wasting your time. Every language is cool and useful (excluding TCL, of course).

    Hell, I didn't want to learn Java, but now I'm glad I did because it can be put on the resume.

    Dancin Santa
  • by melquiades ( 314628 ) on Monday May 07, 2001 @04:43PM (#239897) Homepage
    There are two essentially different ways of approaching the problem of learning to program.

    Philosophy #1 says, "In the ever-changing world of technology, you should leave college knowing all of the most cutting-edge technologies." Programs that emphasize this tend to have courses in specific programming languages and tools, e.g. "Advanced C++".

    Philosophy #2 says (I think rightly), "Technology is such a large world and is changing so fast, any languages or tools you learn now will be useful for somewhere between five years and three seconds. What's really important is that students are able to learn and adapt quickly, and solve problems creatively." These programs tend to have much more theoretical curricula, which emphasize extensive and somewhat open-ended projects.

    Programs of the #2 ilk take a lot of abuse: "Why do I have to learn this dumb language (Scheme/SML/Eiffel/whatever) that I'll never use?" Such complaints miss the Big Secret of Programming: for all the vast differences in quality and popularity, most languages and software tools are essentially the same, and when you know one, it's easy to pick up another. The best programmers are the ones who can adapt quickly and be creative, not the ones who know the top 10 hottest languages. Smart companies know this, and will be much more impressed with your ability to catch on quickly than your textbook knowledge of their favorite language. It's trite but overwhelmingly true: in programming, ideas are more important than facts, and imagination is more important than knowledge.

    If your program is using Eiffel, they're probably leaning toward Philosophy #2. Whether Eiffel is useful to you depends a lot on how you approach the program. If you expect school to be a practice run for your job...forget it! That's what internships are for. If you get excited about the ideas, and constantly look for ways to challenge yourself, bend the assignments around, and just have fun with everything you can get your hands on...well, now you're in business!
  • I don't have any Eiffel practice, but the way I learned the OO concept was Smalltalk. After 'playing' around with it I've got it (code and data encapsulation, and so on).

    I think nuclear power stations run there system with Smalltalk...

  • The linked article has strong points in my opinion.
  • if eiffel is anything like sml that my proffesor is having us learn, then I feel for you...
  • When I was in highschool (I talk like it was all that long ago) we were taught BASIC, C, and ASM. It makes sense to start with Beginners All-purpose Symbolic Instruction Code, and why complicate matters by starting 'em on a multitasking OS? We'd get far better programmers if they all started on C64's and similar (Apple II, Coleco Adams, etc)... plus CMD is still selling C64's www.cmdweb.com [cmdweb.com] for under $150. Could fill a lab with C64's for the cost of 8 new x86 workstations... Not that you'd learn anything more practicle learning C64 BASIC, but if you continue working on a C64 you're definetly going to learn proper memory management. I seem to remember 16k blocks being quite large, strange, something I wrote recently allocates this amount for a trivial buffer... huh... I should pull my C64 out of the closet to re-learn the value of a kilobyte...

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...