Slashdot Mirror


Eiffel as a Gnome Development Language ?

Thomas Delaet writes " This article is a short evaluation of Eiffel as a language for developing the core gnome desktop platform. Last month, there has been a heavy debate about a successor for C/C++ as the language of choice for developing the core gnome desktop components in. The debate has mostly focussed around C#/Mono and Java. This article tries to summarize the different requirements for a gnome development language and shows how Eiffel fits in these criteria."

23 of 397 comments (clear)

  1. "Blue is the color of my Windows screen" by tepples · · Score: 5, Funny

    The Eiffel language may be a good choice for GNOME apps, but wouldn't running a Windows app written in Eiffel 6.5 result in the Blue Da Ba Dee Screen of Death?

  2. Pointless by m00nun1t · · Score: 5, Insightful

    I haven't been watching the debate, but surely a top concern is developer pool? C# and Java are both widely used languages, Eiffel is rarely (although not never) seen outside academia. Surely a large OSS project can't afford to be alienating such a large % of the developer community? There is little incentive to learn Eiffel either - even if you don't know C#/Java, learning them will probably increasing your chances of getting more $ at your day gig, but Eiffel?

    1. Re:Pointless by Anonymous Coward · · Score: 4, Funny

      Actually, Eiffel is rarely seen IN academia - compsci academia, anyway. Eiffel is marketed strongly at "computing for business" types, you know, the ones who buy into the OO, software engineering hype, and write 30000 line monstrosities where a 12 line shell script would do, then go off and "refactor" for another six months and USD500000 budget to produce...the same thing, sliced slightly differently.

      Compscis use stuff like ML and Haskell, while slagging off other compscis who use Common Lisp or Scheme for not having static typing (while the lispers slate the MLers for missing the point because all the interesting lisp programs don't _know_ what types are appropriate ahead of time in their view), and they all slag off the goons using Java to get funding from corporate types.

    2. Re:Pointless by BasilBrush · · Score: 4, Insightful
      If you RFRA you'd see it compiles to C, not C++.

      And anyway, C++ originally produced C code. C originally compiled to assembler. And assembler obviously produces machine code. So none of these languages have anything over the languages that preceded them, and indeed hand produced machine code "other than another layer of abstraction and a longer compile time", right?

    3. Re:Pointless by Anonymous Coward · · Score: 4, Insightful

      > Many academics hate Java for it being a successful, but very real world language.

      I am an academic. I dislike Java. But I don't dislike Java *because* I'm an academic. I dislike it because it's an irritating language to code in; because the libraries are bloated; because it uses an order of magnitude more memory than it should; because Java applications all look horrible, and typically are even worse to use than they look; because Sun want to lock you into their weird dream. etc etc.

      Putting my academic hat on for a moment and looking at what was known about OO languages, Java would have been a merely OK language in the mid 80's if it had existed then. In the 90's frankly it was past its sell by date, and in the year 2004 it's a joke.

      A static type system that's a joke (at least there's going to be a weak-ish generics system in JDK 1.5, but there are other horrors too fundamental to change). A horrible mess between builtin and user types. No modules (classes and static methods do not a module make). Brain damaged name spaces (ever tried "import a.b.c" and then use "c.d"? No, why not do "import a.b.c.*" instead and polute everything!). etc etc. None of these help problems aid development.

      If I a non-realist academic, so be it. Your coding reality is the 1970's. My coding reality is the 90's (there being no good imperative language for the year 2004 yet). Last time I checked my coding environment addressed a lot of realities, although I admit it balks at big collars and kipper ties. So be it.

  3. A new hot topic? by GnuVince · · Score: 4, Insightful
    Is "what is GNOME's next language going to be" becoming a hot topic? You have people saying they should stick with C for all purposes, others saying that every user application should be in C++ or C# or Java or Eiffel. Next thing you'll know, people will be suggesting Haskell.

    I do believe a new language should be used for user applications, but I don't see Eiffel as a contender for a simple reason: syntax. People say they don't care about syntax, but they do. How do you explain the success of Java and C# if not for their C-like syntax? This is why I believe Mono/C# has the biggest chance of winning (also consider the fact that GNOME's big boys (de Icaza, Friedman) are Mono core developpers)

  4. A requirement he missed by Anonymous Coward · · Score: 4, Insightful

    How about a language that people actually know?

    C'mon, really, how many people know Eiffel as compared to Java or C#? Really?

    1. Re:A requirement he missed by Daniel+Dvorkin · · Score: 4, Insightful

      How about a language that people actually know?

      C'mon, really, how many people know Eiffel as compared to Java or C#? Really?


      Well, of course, taking that attitude to its extreme, no new language would ever catch on, and we'd all be coding in ... I don't know, maybe the original FORTRAN or ALGOL 60, maybe machine code for whatever the most popular processor would be (and it wouldn't necessarily be x86, since everyone would have wanted to stick with "an architecture that people actually know.") New languages that offer an obvious and dramatic improvement over anything else that's available for the task at hand* ought to be adopted for widespread and long-term use.

      That being said, of course there is a cost involved in adopting an obscure language, and it has to be measured against whatever benefits the language offers. This is particularly true for large projects. I may choose to develop one-off software of which I expect to maintain personal control for its entire life cycle in Erlang or Ruby or Dylan, but if I'm running a big project with lots of contributors, I owe it to developers and end users to weigh the costs and benefits carefully.

      * As FORTRAN, and COBOL, and yes, damn it, C, all did. C++, maybe. We'll have to wait another decade or so to be sure about Perl, and another two to be sure about Java and PHP and Python, and longer than that for C#. I take the long view.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  5. STL by Anonymous Coward · · Score: 4, Informative

    Most of the big complaints about the security of C++ come because people have little experience with STL and use their own proprietary container classes. In reality STL has given C++ a new life. C++ can be as security safe as C# or java if a comple of simple programming techniques are used: use the STL object classes--they are fast and safe though they require training to use effectively (Scott Meyers' Effective STL is a good start), use garbage collection or register major components (similar to what Mozilla does) to minimize memory leaks, and use exceptions safely (knowing the effect of what construction and destuction of objects will have when the exception is thrown). There really isn't a need to reduce the number of programmers and eyes by switching to Eifell. Just make sure everyone is trained to operate C++ to its full potential.

  6. Another alternative is D by HiThere · · Score: 4, Interesting

    Digital Mars D currently runs on Linux and MSWind. It doesn't, AFAIK, run on the Mac yet, but there's no intrinsic problem.

    I like Eiffel a lot more than C, but I like D better than Eiffel. D is like C++ that got it right. (Well, it was designed decades later, so that's not too surprising.) D links easily with C code. Much more easily than Eiffel does. D doesn't have the wide variety of implementations that Eiffel does. Eiffel suffers from the problem that each compiler comes with it's own set of libraries. (It also suffers from functions not being overloadable, but that's on purpose. Still, I count it as a definite drawback to require different operators to multiply integers, floats, and I*F and F*I -- all require different operators in Eiffel, that that's just the start of the problem.)

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  7. Eiffel? Bah! by JanusFury · · Score: 5, Funny

    Eiffel? Why bother? There is a much better language out there that's already being used heavily on the GNOME platform, along with other platforms like KDE.

    What language, you ask?

    English!

    English is an easy-to-learn and powerful language. A large number of developers already know this language, and there are many tools available to translate it to/from other languages.

    English is a robust and mature language, as well. It's been in use for hundreds of years and its capabilities are well-known and understood by many. Try and match that with some ten-year-old language created by hairy UNIX administrators!

    Compilers and documentation for English are easy to get a copy of, and many are completely free or very affordable. Almost every college out there offers courses in English.

    There are many powerful IDEs available for English - OpenOffice, Microsoft Word, the list goes on.

    Unlike languages like Java and French, there is no central committee that says what English can and cannot 'do'. You're free to explore the potential of the language and come up with new instructions and invent new ways to use existing instructions.

    I honestly cannot believe that English has been overlooked in this debate. It's a perfect fit for GNOME.

    --
    using namespace slashdot;
    troll::post();
  8. OTOH by jabber01 · · Score: 5, Insightful

    Project requirements often dictate the choice of language.

    A developer who knows only one language is not a developer, but a one trick pony; a single-purpose tool that is easily replaced with a cheaper, off-shore alternative, for example.

    Learning the syntax of a new language should not be a significant challenge to an experienced, talented developer. And, it is experienced, talented developers who should be sought for this project. People who know (language X) and can not adapt to new requirements are not likely to contribute anything innovative, new, or original.

    All that said, I don't know Eiffel, nor the particular requirements of the Gnome desktop. If a more popular language fits the bill, great, that's the language that should be used. However, if Eiffel offers particular advantaged, through inherent features not forthcoming in something like C++ or Java, then guess what? A decent developer will eat a book or two over the course of a couple of weeks, and hit the ground running.

    --

    The REAL jabber has the user id: 13196
    What you do today will cost you a day of your life

    1. Re:OTOH by |_uke · · Score: 4, Insightful

      Mind you, the world of C/C++ can be a lot more complex than a lot of other language. Things like learning how to deal with pointers and the most efficient way to utilize objects in C++ is something a developer learns with use. (A more real world example than yours would be: do you use virtual methods and inheritance, or Polymorphism with templates?)

      There is a lot more to C/C++ than just pointers and etc. And even further, many of the patterns, ideas, and practices can all be used across different languages.

      Odds are, the developer who can program in C++, Ruby, Java, Python, Smalltalk and (insert your fav language here)... will have a stronger knowledge of programming practices and syntax concepts, which will let him/her program in EVERY language more efficiently.

      Even further. Once the programmer feels comfortable in programming for a wide range of languages and syntaxes, he/she will generally have a lot shorter learning curve when picking up a new language.

      After a point, learning a new language is less about learning that languages syntax and specialized sugar, and more about learning what kind of new programming practices that language has to give you.

      Probably the largest advantage to knowing multiple languages... is that you have a better understand to which language is the best tool for the job.

      I'm not going to use C++ to develop my web application. I am probably going to use a language with stronger web development support. And while I might use C++ for developing the core components of a game, odds are I am going to use a language like python for scripting those components. Especially with the VERY nice python integration that the BOOST library provides.

      On the same note, I'm probably going to lean away from C++ for developing a desktop application. (Especially applications which don't have large hungry loops.. and even then, I might just use C or C++ for just the intensive part)... I'm probably going to use Ruby or Python. (Ruby if I can find good enough bindings for what I need, python if I can't.)

      Even further... for small unix scripts, I will probably use BASH + awk/sed/etc (and it will generally be typed into the shell, instead of saved to a file). But for larger scripts... I am going to use python, ruby or perl depending on what kind of library support I need. Obviously, if my script needs to cover a very wide range of territories... I will probably use perl... But if my script is mostly self contained, I much prefer ruby.

      --
      Luke
  9. Objective-C? by skurken · · Score: 4, Interesting

    How about it? It's good enough for Apple and it's easily integrated with existing C and C++ code.

    And personally, it think it's sort of UN*X-ish in it's attitude. The way you can fiddle with messages almost makes you feel like playing with a UN*X-installation as root.

  10. I don't think so by hak1du · · Score: 4, Interesting
    Last I looked, SmartEiffel...
    • lacked dynamic loading of shared libraries
    • lacked separate compilation
    • lacked usable Gnome bindings
    • lacked reflection
    • failed to come even close to implementing the de-facto standard set by Eiffelstudio (no compatible thread implementation, no method pointers, incomplete library implementation)
    • failed to come even within an order of magnitude of equivalent C++ code in terms of performance

    Furthermore, Eiffel is hardly an open language standard in the same sense as C, C++, or C#; the evolution of the Eiffel language has been driven by Meyer's whims, not by any kind of independent community or standards body. The language definition had some serious problems (requirement for global type checking, covariance, lack of method pointers, etc.), some of which remain. Eiffel could have been a winner, a worthy successor to Pascal and Modula-2, back when those were still fashionable, more than a decade ago before Java, but its proponents blew it big time, both technically and business-wise. Let's not beat a dead horse.


    In my opinion, C# is, in every way, a better-designed language than Eiffel, C# has better open source implementations, better open source libraries, better C/C++ interfaces, and more widespread industry acceptance.

  11. That's what they currently do by Chuck+Chunder · · Score: 4, Insightful

    However there are increasing signs that various contributers, most notably Novell at the moment, are looking to contribute things to GNOME core that are written in higher level languages.

    And there's where the BFD lies. Do you refuse entry to potentially cool technologies because they add another dependency to the platform and/or have a bit more political baggage than C?

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  12. Re:Laziness will always dominate software developm by cxvx · · Score: 4, Insightful
    for "real" programming, we have C and C++. Java really hasn't made much of an inroads (most of its penetration is with compsci students), C# has barely made any impact at all, and that seems to be limited by those developers who are tied to the Windows platform and need to generate next-gen windows apps. Perl's been around for a long time and, although arguably the ugliest damn language in common usage today, is invaluable for website programming.

    Exactly, that's why there are only 11731 Java projects registered at Sourceforge, which is nothing compared to the 13174 C and 13225 C++ projects. That only makes it the 3rd most popular language for opensource projects. It's just laughable.

    And no serious business applications could be written in Java, as we can see by the lack of things like application- and webservers for Java. It also barely has webservices support. If only that J2EE thingy could catch on, Java might have a chance. How could anyone write serious applications with it outside of academia?

    --
    If only I could come up with a good sig ...
  13. Proof of Concept? by Gactaculon · · Score: 4, Insightful
    Considering how much inertia is behind C in the developer community as a whole, just talking about all these modern language alternatives is going to get absolutely nowhere unless some of these language proponents actually get together and code "proof of concept" desktop systems and Gnome tools to show that their alternative actually _works_.

    If there were a desktop environment along the scale of XFCE or even Blackbox that was actually coded in Eiffel or C# and could be shown to actually be easier to develop for and less error-prone than a C equivalent, then there might be some converts... but someone needs to tackle the implementation problems first before trying to move such a massive program into a totally new environment.

  14. Re:Laziness will always dominate software developm by hak1du · · Score: 4, Insightful

    Look at the most popular current languages: for "real" programming, we have C and C++

    Do you have any data to back that up? I would guess that the largest number of programmers write in something like Basic (mostly VisualBasic), most cycles are spent on interpreted languages, and most LOC are probably still in COBOL.

    You'd figure that if C and C++, with all their quirks, are so difficult to develop with, and time consuming, etc, that developers would jump on these new languages.

    C and C++ aren't necessarily difficult to develop with, they are, however, difficult to develop with correctly. So, lots of C/C++ code gets written, but almost all of it crashes with regularity and has security problems.

  15. C/C++? by matusa · · Score: 5, Insightful

    One thing that I am sure has enraged many is the lumping of C and C++ together. I programmed primarily in C for about 5 years, and a couple months back learned C++ and now use that as my primary language.

    I used to write code in gtk+, and it was quite painful. Function calls look ugly, you are casting things non stop, and constantly finding gross ways to wrap data into a void * which you pass with signals.

    I've been writing apps with gtkmm lately and it is practically a sexual experience in comparison. I can write much cleaner apps, and do so much more quickly.

    I don't mean to appear elitist, but anyone saying C/C++, and furthermore that they are both finished, sounds like someone who hasn't really used C++. And no I don't mean writing an app with methods instead of global functions, new/delete instead of malloc()/free(), and replacing char * with std::string (in C++ you use char * all the time! std::string is another entity altogether); no no no I mean using C++ paradigms (I'm _not_ talking about OO--C++ has a plethora of interesting methodologies which result in extremely fast and safe code (we're not just throwing exceptions and building abstract class heirarchies every time we want to move a bit!)).

    What is important about C++'s heritage of C is _not_ the shared syntax--it's the fact that you can still figure out your overhead basically exactly (as well as you can in C, at least). But the rest is drastically altered. Go to boost.org to see what I'm talking about.

    Note that this is not an anti-C post--that would be ridiculous as not only do I love C but furthermore there are great gtk+ apps (gimp for example--gnome is a bloated mess and doesn't really count IMHO!).

    Remember: the rallying cry of OSS is 'show me the code'. If you think you have a nicer way to code, make it and then publicize. I'll stick to gtkmm for now, and recommend others take a look at it.

  16. Realistically, Java by Animats · · Score: 4, Interesting
    OK, you're doing a desktop. Mostly GUI elements, no hard real time requirements, lots of pointers, many developers.

    Java seems appropriate here, if you can get the performance. It's a memory-safe language, and you don't have to obsess on memory management correctness. Garbage collection is acceptable. There's a big pool of Java developers. There's a hard-code open source compiler. Microsoft doesn't control the language or the environment.

    Whether the rather clunky Java libraries add negative value is something you have to think about, hard. The language itself is OK.

  17. No, in fact people claiming a move are full of BS by 0x0d0a · · Score: 4, Insightful

    Are the people who control Gnome even considering moving it to a new language?

    No, but it makes good fodder around Slashdot, mostly among anti-MS advocates who want something to get riled up about and among a couple of vocal KDE trolls, so several rather misleading stories have slipped their way in. Miguel has been saying for something like two years now that GNOME is not going to be moved to .NET, and that the people claiming it are full of it. Naturally, once a story gets rolling, people happily continue to propagate horseshit.

    Here are a few choice quotes from Miguel, the guy doing Mono who also happens to work on GNOME:

    The short story is: rewriting code does not pay off, and I agree with the thesis of the article. Rewriting GNOME in C# with the CLR would be a very bad idea, if not the worst possible idea ever.

    GNOME is not adopting Mono or .NET as an implementation technology. The headline from the Register is misleading, for a number of reasons:

    * The headline does not reflect any statements I made on the interview (if you read the interview you will notice this).

    * The only future plans that have been approved by the GNOME team (which has 11 voting members on its board) are found here:
    http://developer.gnome.org/dotplan/

    * I am not the GNOME foundation or control GNOME like Linus controls his kernel, I am just its founder and a contributor.

    * GNOME is not built by an individual, its built by a team of roughly 500 contributors in many areas.

    * Decisions in the GNOME world are done by active contributors and module maintainers. I have given
    my maintainership status on every module I maintained to other members of the GNOME team as I got more involved with Ximian and later on with Mono.

    So effectively I have no "maintainer" control.


    and

    GNOME had always tried to have a good support for multiple programming languages, because we realize that no matter how much we loved C as a programming language, there was a large crowd of people out there that would like to use the GNOME libraries from their favorite programming language, which might not necessarily be C.

    This strategy has paid off very well. There are healthy and striving Python, Perl, Guile and Ada communities out there that use the Gtk+ and Gnome bindings to build applications. From rapid prototyping to robust applications: we wanted to empower developers.


    The actual scope of .NET interest:

    After much researching and debating, we decided that a couple of developers at Ximian will join me in working on a free implementation of these specifications. [.NET/Mono]

    This means that there are a few developers who *also* happen to work on GNOME that work on Mono. Guess what? There are people that work on KDE that work on Java -- that certainly does not mean that "KDE is moving to Java". A couple of Ximian developers working on .NET and GNOME support for .NET is akin to a random KDE-related company (like The Kompany) working on a particular application. Miguel's *only goal* is to have an environment for Ximian to develop future applications for. That means that Ximian may produce an application or two written in C#. It is even possible that such an application could become a core GNOME application.

    Miguel has stated in the past that he is dubious about doing rewriting even GNOME-based applications maintained by Ximian -- primarily Evolution. I just can't understand why people have so much problem getting this into their skulls.

    I am not sure what people told Richard Stallman about my plans. Given the confusion surrounding .NET, it is very possible that people were asking `Miguel wants to depend on Passport' or something just as bad as that.

    My only i

  18. Re:Python by Eric+Moss · · Score: 4, Insightful

    Why, yes! That's a great idea. Here's why:

    [1] simple, uniform syntax. Having programmed for $$ in C, Objective-C, Perl and Eiffel, it took me a while to get used to s-expressions, but once I did, I learned new ways of thinking about programs as data that can be manipulated. Now my old friends (ObjC, etc) seem clumsy by comparison.

    [2] Common Lisp can be interpreted for fast prototypes, compiled for speed, and mixed -- core code compiled, and scripts that seemlessly interact with the core.

    [3] It's dynamic. Design targets evolve quickly, and statically typed languages make one waste time deciding if a value should be a float or int or whatever, and re-writing if they didn't guess the future correctly. Once a type can be fixed, a simple declaration allows the compiler to optimize. Clean and quick.

    [4] Common Lisp has macros far beyond the C-family, which makes for code that writes code in a seamless pre-processing stage. Macros are unbelievably powerful, and are possible a result of the syntax of s-expressions.

    [5] Common Lisp is a multi-paradigm language, rather than a "one trick pony". It is object-oriented via CLOS, and more powerfully so than C++/Java/Eiffel. It has multimethods that capture more object paradigms. It is functional when you want that. It can be made declarative by writing a mini-language (e.g. Prolog) via the macro system, and procedural and reflective and whatever else you want. All with one simple syntax, though you can even alter that if you want.

    [6] Common Lisp is fast -- it writes fast, builds fast, and even compiles to good machine code.