What Makes a Powerful Programming Language? 1332
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?
Who cares? Language wars are over (Score:5, Interesting)
1. Its what "everyone else" is perceived to be using,
2. Programming cannot be suitably be turned into a MacJob until the variance in the toolset is reduced.
Microsoft's .Net and Java are going to occupy 70% of the brainspace for programming in the next ten years, and these languages conform to my description above.
Sure, Lisp is cool - its also dead in the market, so stop trying to resurrect it based on its coolness. No one cares.
You want Java (Score:3, Interesting)
I think it fills all the requrements, except for the somewhat misplaced "full support for operator and function overloading".
Why operator overloading would be a mission critical feature for a language beats me. It was excluded from Java for a reason! I assume the reason is how hopelessly confusing it can be to read code where + or && doesn't do what you'd expect them to do. It should be clear when a function is called and when it's not.
Power! (Score:2, Interesting)
Simple sequence
Do While
Do Until
If Then Else
Case
Of course I'm from the school of thought where anything can be solved by using the logic. But what do I know? I'm not even 25 yet.
Objective C + Cocoa (Score:3, Interesting)
Also, all the development tools come free with the operating system(OS X). Project Builder and Interface builder are first rate development tools. WebObjects(not free. 700 bucks) also provides a great medium towards database driven web based applications.
Obviously this depends on whether or not you want to limit yourself to OS X. Who knows, maybe they'll port OS X to x86 =).
-Jacques
jc@cs.washington.edu
Not everything needs to be native to the language (Score:3, Interesting)
This is true for at least some of the other features you listed as well. The language doesn't have to do everything natively, you just have to be able to get it done somehow.
Also, some things that might be missing are really there, just with different names. For instance, multiple inheritence may not exist in java, but it does have interfaces, which sure a very, very similar purpose. Just because it's not multiple inheritance doesn't me it won't meet your needs.
Ultimately it sounds to me like you boss has heard too many buzzwords recently. It might be helpful to ask him why he chose to put each of those requirements on the list. Knowing what needs to be accomplished rather than how he thinks it should be accomplished might just help you find a solution which will actually meet all the needs of the project.
Reeking Requirements (Score:2, Interesting)
Jesus Forking Christ (Score:3, Interesting)
Common Lisp (Score:5, Interesting)
If you have a serious budget, take a look at Allegro Common Lisp [franz.com]. The other choice would be LispWorks [xanalys.com], which is a little cheaper and without run-time fees.
They both have an excellent IDE and come with Interface Builders using CLIM, meaning your apps run under Windows, Macintosh and Unix (Motif) without a big hassle using native widgets.
Powerbuilder (Score:2, Interesting)
Basically the best way I've ever been able to describe it is that powerbuilder has the ease of design like VB but the power of VC++ behind it. For those who don't know it's sybase's baby, and I'll admit it does have bugs (but honestly what software doesn't).
But it's what we're using at my job and I'm happy with it.
really stupid requirements (Score:5, Interesting)
1) Advanced OO design.
Ok, I can understand wanting OOD/OO Programming constructs explicitly supported. Abstract classes (and/or) interfaces and inheritance, etc. are all good OO constructs. But REQUIRING multiple-inheritance? Why? There are many good OO languages that don't do multiple inheritence. And GC has nothing to do with OO - while it might be a good criterion on its own.
2) Operator overloading.
This is such a crock. Is there anything that can not be accomplished without Operator Overloading? There are many arguments against using operator overloading in fact even in languages that support it. (Non-intuitive nature of it sometimes, the failure to implement all operators including comparisons, etc.)
If you take out the 2 dumb requirements above, you open the door to all kinds of languages:
Java, Python, Smalltalk, etc.
Then you can truly evaluate them on the availble RADs for the language, performance and suitability to the end project requirements.
Fire your boss!
Where's the kitchen sink? (Score:2, Interesting)
For example: "simplified GUI design and event handling;" Simplified compared to *what*? Xt is simpler design and event handling than Xlib. Tk is (imo) simpler than X.
Why does he know that he's going to need garbage collection or operator overloading?
The real thing he needs to do is look at the requirements of the project, the skills of the available designers, budget and time and go from there. I'd be really annoyed if my boss came to me and said "You're not supposed to be using C++ because it doesn't have garbage collection built-on."
Re: Simplicity is good (Score:3, Interesting)
> All those features used together is going to make a big mess, IMHO. I think your boss needs some education in computer science.
Mark me -1, Redundant on the many comments already posted about the symptoms of PHB syndrome.
> Operator overloading is not a good idea I think.
IMO, operator overloading is wonderful: define a type for vectors, matrices, etc., and overload the arithmetic operators for them. I've even done it for (simulated) robot sensor scans, and for the ">" sign in a system that uses simulated annealing.
Overloading can make your code much more mathematically intuitive, and hence easier to read.
it's the programmer (Score:2, Interesting)
Re:Python (Score:2, Interesting)
Oh, and it's fast - usually somewhere between C and C++, using the GNU compiler...
Question about MI (Score:1, Interesting)
If Java does NOT support it, then how, for example, does ArrayIndexOutOfBoundsException inherit from IndexOutOfBoundsException which inherits from RuntimeException which inherits from Exception which inherits from Throwable which inherits from Object?
That looks like multiple inheritance to me. There must be something I don't understand. What is it?
Objective C / OpenStep/Cocoa (Score:5, Interesting)
do yourself a favour and take a look at
Objective C and the typical Frameworks
like Openstep or even more recent Cocoa.
As a converted Linux, now Mac User I recently
discovered those goodies and I really don't
understand why they didn't take off in the past
(NextStep has been around since the 80ies).
Objective C is such a powerful dynamic language
and it is real fun to write programs with it.
You have a clean and lean Smalltalk-in-C object
oriented syntax and are able to use all those
low-level C APIs... I don't know any better.
PS: For the use with Windows try to get one
of the OpenStep 4.2 packages one often find
at ebay. Besides the native Next/Sun/i386
OpenStep OSes it includes a devkit for
the use under WinNT... If use ever had to
use COM and alike, you will really, really love
OpenStep....
PS: There is even a GNU implementation of the
OpenStep API... -> GNUStep
Pointers:
http://www.stepwise.com
http://www.gnustep.org
Re:for starters (Score:4, Interesting)
As the original post mentioned, be careful you're not just "sitting around discussing the language without discussing the problem." As you just demonstrated, even design has its buzzwords. No one methodology is ideal for solving all problems. Choose the best tool for the task, and this includes methodology.
Beware of just abstracting the language debate to a higher level.
Re:Question about MI (Score:1, Interesting)
You're confusing a long single-line-of-descent inheiritance chain with MI; MI would be if ArrayIndexOutOfBoundsException inherited from both IndexOutOfBoundsException and ReportExceptionToFile, two base classes at the same level, instead of just from IOOBE.
In Java, a class X can only have a single base class from which it is derived, but can implement as many interfaces as it wishes. It can't inheirit the implementations from any other class than its single baseclass, so it has to have the implementations in-house, so to speak. X can use delegation, but can't directly inheirit from multiple classes.
Kylix (Score:3, Interesting)
-John
Re:Sigh, here's the Java version (Score:3, Interesting)
Since a Java interface is akin to a C++ base class with nothing but pure virtual member functions, it cannot provide any *code* to the derived class.
Now, you COULD implement this by having a DSP_handler_core class that implements the functions, and then having a bunch of statements in the derived class tossing functions to an internal DSP_hander_core object, but now you are writing many trivial routines just to toss the functions.
Your assignment (should you choose to accept it) it to show how a class can pick functions from two base classes to get a task done.
You might try a) READING the post and b) LOGGING in next time.
Re:I respectfully disagree.... (Score:3, Interesting)
If garbage collection comes along, voila!
The biggest single problem with Java's GC set-up is that finalisers may never be called. They are thus completely useless for anything other than a convenient debugging aid. You certainly can't put vital things like resource release code in there. Even if you could, late release of resources due to a GC system that only understands memory is enough to deadlock an application.
Well... (Score:3, Interesting)
Would you rather have:
((a^b+e)/c*(d+b+a+b)
Or
(a.power(b.add(e)).divby(c.multiply(d.add(b.add(a
Re:It should have a (Score:2, Interesting)
sorry, i don't have moderator status.
A hot topic. Java. Versus ... Perl??? (Score:5, Interesting)
And a good sign of it being an emotional topic is that almost all of the posts are below my viewing threshold. Far more than normal.
Here's my take: I used to be one of the biggest Java advocates around. (In fact, I was one of the winner's of Sun's Java Cup programming contest.) I fought off learning Perl for years, but today, my language of preference is now Perl. Here's why:
(And on a rather irrelevant, but rather appropriate bit of symbolism: I happened to be wearing a JavaOne Long Sleeved T-Shirt tonight as I wrote this. The wrists were a bit tight, shrunk from washing, I guess, so I tugged on them to loosen them a bit. The whole sleeve ripped. Kind of symbolizes my experiences with java. Shoddy merchandise, all around
-me
Re:for starters (Score:2, Interesting)
Paul Graham discusses this in an article called Beating the Averages [paulgraham.com] that was posted on /. a while back (here [slashdot.org])
Look at it this way: All the common languages are Turing complete, so they are all fundamentally equivalent. Do you then conclude that your choice of language is irrelevant? I think most people would disagree. Some things are a lot easier in some languages than in others.
So, although you're certainly partially justified in your rant, there is a germ of rationality in the original query.
Re:Objective C + Cocoa (Score:3, Interesting)
The Project Builder application gives you just about everything you'd need in an IDE. The Interface Builder makes it simple to set up the user interface. It's actually fun to use, it gives you plenty of freedom to lay stuff out as you want but it also offers some great tools to simplify the process.
Right now the only thing holding me back from using it all the time is the fact that whatever I code using the Cocoa APIs are going to be MacOS X only. On the other hand I see MacOS X going far in the next few years so maybe that's so bad.
Re:Why doesn't... (Score:3, Interesting)
Amen, brother
The worst are casting operators, such as "operator const char*()", that can really lead to bizarre code and hard-to-catch errors because if your finger slips on the keyboard while entering an operator, you will all of a sudden vastly change the semantics of your code while the syntax, at a glance, appears the same. And who outside of the secret, special cadre of C++ gurus can fully predict the results when you have a combination of casting operator overloading and method overloading on a call? I end up explicitly casting objects such as _bstr_t that misuse this behavior and do not provide an alternative named method to avoid confusion in my code.
The totally weirdest is, of course, in STL, where they have the function operator such as "result_type operator()(const argument_type& y) const;" where for object foo you would call "foo(argument_type_obj)", and the object reference behaves like a function pointer. This can create some really cool algorithmic constructs like a "for each" in C++, at the mere expense of zapping your noodle with pyschodelic hippie mind rays.
Re:really stupid requirements (Score:3, Interesting)
this paper [sun.com]explains why people want to ADD operator overloading to Java. Oh, and this isn't just some hack, this is Guy Steele. He has been heavily involved in the design and/or standaradization of C, Lisp and Java. Yeah. He's smart.
People want Operator Overloading as a choice in language design. All the other objections to Overloading in this thread has been about C++ overloading. You don't need to have constructors or whatever or not being able to find out what the call actually is. That's a limitation of the language, not the concept.
-Dan
To answer the question... (Score:1, Interesting)
Designing a language from the ground up is a fool's errand, but assuming I'm that kind of fool, I'd categorize the above features as follows:
Features to include at all cost:
Features that are annoying and should be avoided if possible:
Features to avoid at all cost:
Re:C++ (Score:3, Interesting)
In both of these examples, reference counted memory models just don't make sense. In the case of the doubly linked list, the obvious ownership strategy is for the list to own its nodes. The nodes should not own other nodes. In the observer pattern example, one approach would be for the observer to own everything. This approach makes sense since the observer sees everything.
C++ allows you to choose a memory management model that fits the problem domain. In some cases, reference counting is a terrible model. GUI programming is a great example of where it would be a bad model (which is why Qt uses a tree based memory management strategy)
Re:OO is the biggest development myth of the centu (Score:3, Interesting)
No. You're thinking of MSVC++ and drag and drop programming. OO is about modeling and it can be very effective.
It does this by trying to compartmentalize functionality and seperate implementation from usage.
This is the stuff trolls are made of Jayson. OO does not "compartmentalize" and it is not about contract programming. You have a very superficial understanding of OO principles.
Each instance of an object in a program is a model. You think about what it is conceptually that you are modeling and derive classes for those concepts. In practice these objects usually have hierarchial and recursive relationships. For example a stock is a security but a security is not a stock because it could be a fund. Or a WWW document has elements and frames where frames may be sub documents. These relationships are found everywhere and can be modeled most effectively using OO priciples. That's not to say you should use OO for everything (e.g. you wouldn't want to represent each character in a document using a separate object). Indeed I don't beleive 9 out of 10 developers using an OO language are actually writing OO code. It's modular at best. To use it effectively is non-trivial.
To see how OO has eschewed its own features just look at how delegation is favored over inheritance. This is a functional way of programming.
Like I was saying above, the results of OO are most effective when used strategically. The highest level superstructure benifits greatly from an OO organization. But using OO to a fine degree is not necesarily good.
Which language (Score:1, Interesting)
For small to medium sized projects use Visual Basic, PHP, Python or Perl.
For medium projects consider Delphi, Python, Java, C#. But know that Java and C# are slow compared to native machine code.
For large projects consider C++ and Ada95. Both compile to native machine code. Use C++ because of the many tools available for it. Use Ada95 because it was designed to write reliable long-time used software in large projects. Ada95 can be compiled to Java Bytecode, too (with JGNAT).
Note: An IT professor told me that there is no 100% error free C++ compiler in the world! AFAIK only for Ada 95 exist valided error free compilers. There exist very good development tools both for C++ and Ada 95.
http://www.gnat.com
http://www.adapower.com
Re:Common Lisp (Score:2, Interesting)
I suspect that if the original poster were to present his boss with the suggestion to use LispWorks, for example, new requirements would be forthcoming.
No Unicode, no cigar (Score:3, Interesting)
Ruby is like Perl. It's for parsing and filtering byte streams, and like Perl it's great for that sort of app.
Such languages are not ideal for interactive GUI apps that are all about visual display and interaction. Go for Java or C# or VB.Net or C++/KDE and forget the MI or overloading nonsense. That's not how you pick a language.
Take a look at Jade from Aoraki Corporation (Score:2, Interesting)
Re:Who cares? Language wars are over (Score:1, Interesting)
Python is the only more-recent language I can think of which offers many of the same advanced features together with a sensible syntax. Python also offers some features that LISP doesn't, like some of the libraries for XML and text processing, but LISP is substantially faster than Python in many cases.
I'm unhappy about Python's speed, since I'd like to use Python for more things than I do use it for. Has anyone tried speedup techniques like JIT compilers for Python?