Slashdot Mirror


What Makes a Powerful Programming Language?

A not-so Anonymous Coward queries: "My company is about to start development on a new project, and I have to decide on a language and development environment. My boss gave me a set of criteria which needs to be filled: intuitive and easy to use IDE; simplified GUI design and event handling; advanced error handling; advanced object oriented design including multiple inheritance, abstract classes, and garbage collection; full support for operator and function overloading; and portable (at compile-time) across various platforms. I have already looked at C++, Java, C++, C#, Eiffel, and even VB.net; I may be missing something but as far as I can tell all of these languages are missing something from this list. Is there a language available that has all of these features? I thought that someone from Slashdot would be able to point me in the right direction?" If you were to design a language from the ground up, what features would you include and why?

5 of 1,098 comments (clear)

  1. Ruby by JamesOfTheDesert · · Score: 5, Informative

    Don't know of a GUI as nice as, say, VS.net, but here are few in the works that look quite promising. Other than that, Ruby fits your needs quite well.

    --

    Java is the blue pill
    Choose the red pill
  2. C++ by yamla · · Score: 5, Informative
    intuitive and easy to use IDE; simplified GUI design and event handling; advanced error handling; advanced object oriented design including multiple inheritance, abstract classes, and garbage collection; full support for operator and function overloading; and portable (at compile-time) across various platforms. I have already looked at C++, Java, C++, C#, Eiffel, and even VB.net;

    Let us take a look at how C++ compares.

    Intuitive, easy-to-use UI, check. This is a stupid requirement for a language, though, as any reasonable language should allow your choice of UIs. I've used Visual Studio for C++ as well as emacs and, currently, KDevelop, which I like quite a lot.

    Simplified GUI design and event handling. C++ does not determine how GUIs are handled but we use Qt which works very well for what we want. Visual Studio lets you do GUI design inside of it, as does Borland C++ Builder.

    Advanced Error Handling. Define advanced. C++ gives you try-catch, etc. and provided you put a big of work into it, can be pretty good at error handling.

    Advanced object oriented design including multiple inheritance, abstract classes, and garbage collection. Well, C++ is the language most people think of when someone says OO. That said, C++ does not have any built-in garbage collection which is in my opinion a shame. Still, you can plug in garbage collection if you want, though the URLs escape me. In my experience, this has slowed down the execution of my C++ applications considerably but that said, my applications tend to allocate and deallocate memory quite frequently.

    Full support for operator and function overloading. Yes, C++ provides this.

    Portable (at compile-time) across various platforms. Well, C++ is NOT, in my experience, as portable as Java is. That said, if you use a platform independent GUI library such as Qt and you are smart in how you code, you shouldn't have any great problems. Gnu Autoconf, Automake, and Libtool, published by New Riders, will help you out here.

    So is C++ the language for you? That is impossible for me to say. The two major things it is missing is a GUI library (though Qt is excellent for this) and garbage collection (though this may not be a big issue). Personally, I find it easier to code in Java, mostly because Java does not allow things like multiple inheritence or operator overloading. Don't get me wrong, there is good reason to use these (and my C++ code occasionally does) but on the other hand, it can lead to much hassles. Very few projects really need multiple inheritence, for example, and MI can lead to all kinds of nasty problems. Do you really want to sink to the level of virtual inheritence, for example?

    Really, though, we cannot help you out all that much more without knowing what kind of project you are working on. Your requirements seem to indicate this is not a small project. As a result, I'd advise against VB.Net, having spent a year working in VB on a project about a third of a million lines of code long. C# has potential (it is a blunted-scissors version of C++) but really isn't mature enough at the moment. Eiffel I have no experience with. Java is great in SOME circumstances but I'd hesitate to recommend it to you without more information. And then there's C++, which I have spoken about in great length here. But C++ is a tricky language to use correctly.

    --

    Oceania has always been at war with Eastasia.
  3. Python has operator overloading by paulschreiber · · Score: 4, Informative

    really, it does.

    Paul

  4. programming languages are engineering tradeoffs by markj02 · · Score: 5, Informative
    You want a very expressive object system? Great, but you don't get static type checking anymore. You want overloading? Great, but type inference goes out the window. You want fast executables? Sure, but expect to have to tell the compiler in excrutiating detail what you are doing and how you are doing it.

    Still, given your feature list, CommonLisp may be your best bet (the CMU CommonLisp implementation for Linux is pretty good). It's a very expressive language and compiles into reasonably good code, although it doesn't have much static type checking, the language definition is messy, C-like performance can be hard to achieve, its C interface is a bit cumbersome, its libraries are less than stellar, and its user community is tiny. Bigloo, a compiler for Scheme, interfaces more nicely with the rest of the world and generates reasonably good code, but lacks threads and has a less expressive object system.

    If you want something statically typed, O'Caml is a great language, combining object oriented and functional programming. It generates good code and interfaces reasonably well with C. However, you don't get overloading.

    For great libraries, reasonable performance, and good standardization, Java can't be beat, but the language itself can be a little tedious. C# fixes some of the tedium of Java, but its libraries and performance are nowhere near as good yet, and it's pretty much Microsoft-only for now.

    And don't forget about C++. For complicated numerical algorithms that need to run fast, there is nothing better than C++. For complicated GUIs, and interactive applications there is almost nothing worse, however.

    So, overall, there just isn't a single answer. Every language is an engineering tradeoff. Learn many of them, and you will benefit both from the experience and the choices you have.

  5. Delphi/Kylix/C++Builder by eric2hill · · Score: 4, Informative
    As others have stated, look at Delphi/Kylix.

    I work with Delphi on a daily basis. Delphi supports (fully) all of the following:
    • The GUI is simply fabulous. There are also productivity add-ons to make development even faster.
    • Full exception model included, and support for write-your-own exception model.
    • Complete OO design model, however it doesn't support multiple inheritance. Instead, interfaces are fully supported. Abstract classes and interfaces accomplish 99% of what MI supports. I would vote for MI in the next release of Delphi, simply to complete the object model, but I haven't run across a problem yet that can't be easily solved using classes and interfaces.
    • Garbage collection is automatically performed for strings and interfaces, but anything you allocate memory for you need to free.
    • Full support for object inheritance and function overloading. There is no operator overloading.
    • Portable from Win32 to Linux (using QT...)
    --
    LOAD "SIG",8,1
    LOADING...
    READY.
    RUN