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?
Python (Score:5, Insightful)
Re:Python (Score:3, Informative)
I'm working at a software firm where we're using Python and Tk for our GUI development.
The only big complaint I have about Python is that I would really like to be able to enforce static typing. In python, you can get some "thing" as a parameter and perform operations on it, call methods on it, return it back, without having any idea what it is you're working on until run-time, when your program barfs on the thing it got.
Of course, the dynamic typing allows fast development, but the maintenance afterwards (especially when the code has changed hands) can be a bit of a chore sometimes.
Overall, however, I think Python is extremely cool.
Consider Python carefully (Score:3, Informative)
If you're looking for the weirder OO features like operator overloading, you'll find them in Python, but the calisthenics you have to go through to do it might make you think twice about using it.
The only real drawback to Python is the execution speed. One of the AI projects I previously mentioned worked great (and I completed it probably 10 times faster than I would have had I been using C/C++), but it ran very very slowly. The cause of the problem is clear -- no static typing, reference-count garbage collection, a stack-based VM (I ain't knockin' it! It's just hard to optimize)...
If you are planning to do anything compute-intensive, maybe Python is not the right choice. It's always possible to break out to C/C++ with the Python API (to do your compute-intensive tasks), but there are drawbacks: over time, the Python C-API will probably drift, and you'll have to keep tweaking your native code to keep it working. Also, the inner workings of Python, especially refcounts, can be boggling and the source of bugs and memory leaks that can be fantastically hard to track down.
If you consider Python, then great. Just keep these points in mind.
Re:Whitespace as syntax (Score:3, Informative)
Eh?
>>> for i in range(0,4): print i
0
1
2
3
>>> for i in range(0,25): print filter(lambda a: a % 2, range(0,i))
Works in Python. You'll have to try harder to find some other reason to hate it.
Re:Whitespace as syntax (Score:3, Informative)
What you can't do in python is make your code's actual block structure inconsistant with your code's apparent block structure -- and thank Guido for that!
And as another poster mentioned, you *can* stick the trivial loops on line 1. Python's a bit smarter than most folks who don't know it assume it to be.
Sounds like you need a PFM tool (Score:5, Funny)
PFM is cool, but avoid ... (Score:3, Funny)
Simplicity is good (Score:3, Insightful)
to make a big mess, IMHO. I think your
boss needs some education in computer science.
I'd recommend you look at Java and Python.
Operator overloading is not a good idea I think.
Re:Operator overloading (Score:5, Insightful)
Look at the '+' operator for strings in the C++ standard library. That is definitely an overloaded operator, and it does something way different. I think that this operator is definitely a good thing (sure beats the pants off of strcat).
I think operator overloading is a good idea. Just use the power wisely.
Re:Operator overloading (Score:3, Insightful)
Re:Operator overloading (Score:3, Informative)
That's one thing I dislike about Java; it intentionally cripples the features available to the user whilst using similar features in the design of the language. For example, you wouldn't want to write Java in Java, because it just isn't functional enough to do a decent job.
Re:Simplicity is good (Score:4, Insightful)
I agree. Most of those requirements does not make sense, they seem to be pure buzzwords bullshit by your boss [dilbert.com]
Java, for instance, fullfill most of them (except by the multiple inheritance and operator overloading, as already pointed out), but not all. Are you going to discard it just because of these 2 lacking features? Do you really need them? What else does you need that java does not offer, templates?
Re:Simplicity is good (Score:5, Funny)
Exactly right! While reading the long requirement list, I was expecting the last one to be:
"and a cute animated assistant to help us find our way through the features."
Re:Simplicity is good (Score:3, Funny)
Most of those requirements does not make sense, they seem to be pure buzzwords bullshit by your boss
Exactly right! While reading the long requirement list, I was expecting the last one to be:
"and a cute animated assistant to help us find our way through the features."
See, that's the problem with AC posting: it was a funny reply moded down to -1...
(I hope this one does not have the same fate
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.
Why specify language features? (Score:5, Insightful)
Re:Why specify language features? (Score:5, Funny)
Because he can...
One question... (Score:3, Insightful)
Simple. (Score:5, Insightful)
Re:Simple. (Score:5, Funny)
It does have a couple of down sides tho...compilers cannot be purchased, only hired. Also, the compilation process can be time consuming depending on the skill of your compilers.
However the ability to have your product planning team create the
Oh...and it is also fairly simple for a trained engineer to port English programs to languages such as French, Spanish, Russian or even Japanese!
Python? (Score:2, Redundant)
It should have a (Score:2, Funny)
e.g. DoThis("securely connect to the database and return the data on the user"
or DoThis("delete all spam from my inbox")
or maybe even this DoThis("Prevent this comment from getting modded down by some jackass")
The boss probably already knows the answer ... (Score:5, Insightful)
When people have a long shopping list of specific details, it almost always means that they have decided and have set up the requirements so that only the one answer is correct.
This is, of course, a conventional way of doing "open" hiring or purchasing. You just write up the specs so that only one person or product can fit. It works just as well with software.
I would assume not... (Score:3, Insightful)
I would go back and engage him in a discussion on which of these goals are most important, with the (unstated) goal of trying to convince him that whatever language you think would be best really is best.
Istead of looking at his criteria, look at the project and the goals, and make your own decision. It seems as though he wants a good language that's also easy enough for all of the programmers to use, so if you randomly pick C++ or java for instance, you could convincve him that it would do fine because almost everyone knows it well enough to code in it anyways, and it fits the requirements as well as any of the languages do. (This isn't an endorsement of C++, Java, or of any other language.)
Re:The boss probably already knows the answer ... (Score:4, Funny)
Only language that comes close... (Score:3, Informative)
for starters (Score:5, Insightful)
This is what pisses me off. If you would put some thought into the product and the design abstraction, this would be an easy question. Instead, people charge off with grandiose ideas and big buzzwords (event handling, GUI, object oriented).
People wonder why there is so much crap software out there. This is one reason: sitting around discussing the language without discussing the problem.
I know I'm being kinda mean, but it's how I feel when I read such a newbie question from someone claiming to be attempting such an important task. I hope this post lasts long enough for discussion before being modded down to -1.
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:for starters (Score:3, Insightful)
Amen. Diagrams, like any other documentation, should be carefully abstracted summaries of the code, not 1:1 duplication of it. 99% of the UML I do is on a white board or on scratch paper, which is where it belongs.
Ruby (Score:5, Informative)
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.
Java (Score:2)
Geesh, at least response to the question (Score:2, Insightful)
You may feel that java is the answer for the poster, but it doesn't meet the criteria. Even ignoring the vague, flame-provoking concepts of "intuitive and easy to use IDE" and "simplified GUI design and event handling"... Java doesn't do multiple inheritance or operator overloading.
Perhaps you think that no project needs these... great, at least tell us why in your response, rather that spouting, "Java... Java... Java"
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.
Re:Who cares? Language wars are over (Score:4, Insightful)
Smart programmers will choose the most powerful tools for their job.
They don't get the mainstream IT press headlines that Java, C#,
Re:Who cares? Language wars are over (Score:3, Funny)
Re:Who cares? Language wars are over (Score:3, Insightful)
Prolog syntax should take about 15 minutes to pick up. Programming patterns should take another half day by anyone who's done functional programming -- i.e., anyone who really knows their CS. After that, it's just a matter unraveling someone elses code, and possibly mastering a specific library or API -- no easy task in ANY language. Code in general writes easier than it reads.
In general, I think it's very odd that people look for programmers experienced in a particular language. Once you've learned to solve problems using a few programming paradigms, most of your stuttering is going to be syntactical, and in using libraries/frameworks. I can appreciate that an employer might want someone who knows and API or library or protocol backwards and forwards -- that would save some time. But there's a lot of jobs I've seen calling for years of language specific experience when any competent programmer could do the job with a good manual (whether good manuals exist is another story, but hey...).
Finally, there probably are more people out there who know Prolog/ML/Haskell/name-your-favorite-minority-lan
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.
It all depends... (Score:2, Informative)
The best solution is ultimately probably using two languages - perhaps Java for interface work / portability, but also C for anything that needs to interface to hardware, or needs the performance. I'm only using Java and C as examples - but other languages are the same.
Most languages can't do everything. Pick the best for the task required and the skills available.
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
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.
Fantasy (Score:5, Funny)
Since we're in a complete fantasy realm here where all of use have the brainpower, patience, trust fund, and buckets of countless free hours required to even BEGIN such a task...
...can I have a pony?
What's wrong with C++? (Score:3, Informative)
I don't get it; what's wrong with good ol' C++, according to that list?
I can only see two possible deficiencies according to your requirements. The first is the lack of a truly portable GUI library (though you can get libraries like Qt that are reasonably cross-platform in some cases). The second is the garbage collection, but (a) you can use a garbage collector for C++ (if you must...) and (b) using the right basic tools and techniques, garbage collection is largely unnecessary in a C++ program anyway.
The biggest problem with C++ is getting people who program it, as opposed to C-with-bolted-on-classes-here-and-there. But if you've got a half-decent team and someone with smarts in charge, all of your concerns should be non-issues.
The one the best programmers use of course... (Score:3, Insightful)
I'm also having this problem (Score:5, Funny)
I think it's the same language that they use to program the holodeck.
"Computer, make me a map of all the known last locations of Romulan war ships."
Hmmm. almost looks like AppleScript.
Don't pick the language first, solve the problem! (Score:5, Insightful)
Making a list of neat features won't do you any good. It's this approach to problem that causes bloatware. If a product is guaranteed to solve all your problems, you can be assured, it will solve none. It's all marketing!
Not exactly true, minority langs introduce costs (Score:3)
Often it simply doesn't pay to use a minority language, even if it seems better suited to the problem.
Sounds suspicious (Score:5, Funny)
You have the difficult choice to buy a car in any color, provided the color is black.
Python....load, debugging, portable, what more... (Score:5, Insightful)
Python will, if designed properly handle any load you could want to throw at it, it is portable as it gets, its easy to debug.
I cannot imagine what you are writing, or your boss thinks youre going to write that needs all that in one place at the same time. My bet is this is a buzzword hyped dude that has no Idea of the actual functional requirments. He wants an IDE and RAD, Im assuming so any 12$ an hour lackey can help support it at a later date as well as speed initial development. If portablity is the least of your concerns(in short term) VB.net would be the choice. In about 2 years VB.net programmers will be like VB programmers are now....a dime a dozen. That has more value than you can imagine on a large scale project whose lifecycle is indeterminite.
Screw em all and write it in assy, dont let em see any progress and then unleash it upon them complete, debugging is easy, if its wrong it dosent run. Its portable, from same architecture to same architecture(snicker), it actually will scale(buzzword insert)BUT THE SINGULAR MOST IMPORTANT PART is Youll have a job for life, at whatever you want em to pay you to maintain it
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.
Jesus Forking Christ (Score:3, Interesting)
Of course they're all missing something! (Score:5, Insightful)
You probably ought to try to weasel more requirements out of your boss.
That said, the closest match to your problem is almost certain Python. The only "bullet point" missing is "abstract classes", but in Python, the term "abstract class" is nearly meaningless; they aren't necessary. But if it makes you feel better to create them, do so. Some people do for stylistic reasons.
Functions are overloadable, you just have to do it by checking types. For paying that price, you also get some cute stuff with *args and **kwargs (look at the docs for those things until you understand them), which can be lifesavers when you want them.
As for the "simplified GUI coding", you get *many* choices: Tk ships by default, and while ugly, is fast and effective for many uses. wxWindows is well-supported (in all senses of the word), looks native on all supported platforms, and is extremely flexible. (I'd rather program in wxWindows then MFC, even if I were doing a Windows only program! And it's a rare MFC program that couldn't be done in wxWindows.) Various IDEs are available for these things; you often don't need them. And there are many other choices as well.
If Python lacks the Hype Veneer and you think your boss cares about that, then you've probably got to go Java, along with the purchase of an IDE. You don't get simplified GUI programming, but I don't know of *any* hyped language that has simplified GUI coding.
Hold your horses! (Score:5, Insightful)
Hold your horses! Have you really taken the time to understand the *problem* yet? This post is just a laundry list of various programming language features and buzzwords. Choosing a programming language is not like choosing a car, and just adding on all possible accessories and upgrades. More features does not a better language make. I'd have your boss clarify the reason for each and every feature (and yeah, "programmers are familiar with this" probably is a valid response - but there should at least *be* a response). Does your boss even know what multiple inheritence and operator overloading is, and why one would even want it? Until you can justify the features you want, there can't be a debate on "what is the most powerful programming language?". It's like "what is the best religion?", or "what is the best color?".
What IS the best religion? (Score:5, Funny)
Dear Slashdot,
My boss gave me the assignment to find the best religion. Some requirements that he gave me are:
<UL>
<LI>Should keep one from everlasting suffering and torment in next life
<LI>Should help one eventually pass to nirvana-like existence, eternal increase and well-being, perhaps even an all-powerful/omniscient state
<LI> Should help one to acheive balance, peace of mind, and a strong feeling of being alive within this imperfect world
<LI> Should enable the occasional performance of miracles when called for
<LI> Should improve behavior of followers (make them charitable and courteous but zealous in good causes), and help them improve the world
<LI> Should have limited numbers of flawed adherents
<LI> Should have a consitent theology that makes total sense to rational minds and mystics alike, yet is accesable to the common man
<LI> Should provide insurance against armageddon-like scenarios
<LI> Should have a finite (yea, even small) set of clear, detailed, and consistent directions for acheiving all positive results (Goedel's theorem notwithstanding). Not to mention avoiding bad results.
<LI> Should be in line with the will of the universe's most powerful entity.
</UL>
I've looked at Christianity (Catholic, Eastern Orthodox, Melkite, Coptic, Protestants of several stripes), Islam, Buddhism, Hindu-ish faiths, and primitive animism, Kibology, Shirley Maclain, Scientology, Wiccan groups, secular humanism, and both U.S. political parties, but they all seem to be missing something. Can you point me in the right direction?
Also look at Delphi/Kylix (Object Pascal) and Perl (Score:5, Insightful)
A couple other languages/environments you may wish to look at are:
I don't have much experience with Delphi 6/Kylix or Object Pascal, but Perl 5 will handle most of your requirements.
Personally, I would go back to your boss and ask why he needs all these features. The list of requirements sounds more like a buzzword-compliant list of programming language features that a typical PHB would come up with than a real requirements list. For example, if a design document hasn't been created, it's likely that this list of requirements is bogus.
NOTE: I found Cliff's question appended to the end of this story very confusing. It's orthogonal to the original question, at best. At worst, it's going to cause two entirely separate topics of discussion which will be difficult to distinguish when reading comments.
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.
Re:This is the WORST of all possible options. (Score:3, Insightful)
Common Lisp has grown alot in the past years, but it's expresiveness of theoretical problems is superb above most other languages. Wether you are a programmer with no mathematical background, or a mathematician with no programming background, CL will be easy to learn.
One should definitely have a look at CLOS (Common Lisp Object System), which beats most other Object Systems with ease (especially because of the metaobject protocol).
Then take C (and all derived languages, such as C++, Java (and Perl)). Most OO paradigms in these languages are hacks, not expresive, not extendible, no reflection. I'm not saying these languages are bad; these are just the languages in which most work has been done for the past 30 years. But there are more languages to see and to learn.
You should definitely have a good look at Lisp, for me it was an eye-opener.
C++ (Score:5, Informative)
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 [kdevelop.org], which I like quite a lot.
Simplified GUI design and event handling. C++ does not determine how GUIs are handled but we use Qt [trolltech.com] 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.
Re:reference counting (Score:3, Insightful)
2) you have ignored any time performance. Reference counting adds overhead even if you never accumulate a significant amount of garbage.
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)
Let me offer a proverb... (Score:5, Insightful)
It's just plain silly to ask "what's the best programming language." That's like asking: "which is better, a hammer or a screw driver?" The reverse of the proverb is also true. If you have a diverse toolkit, and nothing but screws to drive, then everything in your kit looks like a screw driver.
It comes down to using the right tool for the right job. It's not a simple question to ask, mind you, but your question is too vague to be answered at all. If you are doing text processing, use Perl (ignoring the argument that Perl does everything, of course) or some type of stream editor. If you are writing an operating system, use C. If you are doing artificial intelligence, use Lisp or Prolog. If you're writing a document, use HT/SG/XML or LaTeX. Building a GUI app *really* fast? Use Tcl+Tk.
Let me rephrase your question with more specifics. "Which is the best programming language: Perl, C++, LaTeX, CSS, Japanese, or ASM?" That's nonsense (although everyone knows that Perl is better
It still baffles me how such stupid questions get posted as Ask Slashdot topics. The editors are genuinely retarded [slashdot.org].
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!
Python has operator overloading (Score:4, Informative)
Paul
Re:really stupid requirements (Score:3, Insightful)
Matrix a, b, c;
a = b + c;
Did you realize that, in coding this way, you invoke a Matrix constructor and destructor every single time you use such syntax? This is the kind of hidden cost that just kills program efficiency. C++ allows you to define a copy constructor which would alleviate some of the superfluous constructor overhead iff you use this syntax:
Matrix b, c;
...
Matrix a = b + c;
Anyone who argues that's intuative ought to be taken out and put out of their own misery. Beyond that, though, There is no way to get rid of the destructor overhead when using operator overloading . Nope. Can't do it. Not supported by the language.
Operator overloading arguably makes for more intuitive correct code. But it makes for far less intuative efficient code.
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
Language power is a myth. Here is my take. (Score:4, Insightful)
What is relevant is this: does the language support all the right abstractions so that the programming solution to a given problem within a given domain can be expressed using elements that closely correspond to the ideal objects understood by the experts in that problem domain.
Now a language that does this may be very domain-specific, and not flexible at all for solving problems in other domains. Or it may be very flexible so that it allows abstractons to be created to new domains that were not even known when that language was created.
So, returning to the vague notion of power, when can we at least tentatively say that one language is more powerful than another? When for a large body of different problems, that language can rise to the occasion and provide the ideal abstractions for expressing the solutions for those problems, whereas the other language fails to do so, and only for a few, if any, problems the reverse is true.
Lastly, what does it mean to have the ideal abstraction? It means not to worry about managing the representational or procedural details of the computation that are not relevant to the solution domain, or having to transform, rename, reshape, reinterpret anything. Unfortunately, this rules out nearly all languages whose only abstraction-making mechanism is making class or function libaries, because not every abstraction in a problem domain neatly corresponds to an object with methods. Only languages which are programmable---meaning that they allow you to write your own sublanguages and provide them as easily as function libraries to other programmers---can support this shape shifting, to produce abstractions to unforseen domains. People can develop custom sublanguages for anything: solving logic problems, querying databases, composing music, generating markup, whatever. You can do these things with object frameworks, but then you lose abstraction; the object programming gadgets rear their ugly head with details like what to instantiate and how to hook it up to something else, etc.
Think about your while() loop in C or Java. The while loop is an ancient abstraction of control flow that someone had to invent. Yet your objects are not powerful enough to implement even this simple abstraction from scratch; you can't make a ``WhileClass'' whose instances do the job of a while loop.
``while loop'' class. (Score:3, Insightful)
I hope it's obvious to you how inferior this is. The real while loop doesn't require you to package up your test and body as a function. When you do that, you have introduced a problem of context, which breaks the abstraction.
By the way, in Common Lisp, you CAN implement the while loop as a function, and yet provide it as a ``language-level'' abstraction as well. Here is how:
(defun while-func (expr-fun body-fun)
(tagbody
(cond
((funcall expr-fun)
(funcall body-fun)
(go
(t (return-from while-func (values))))))
(defmacro while (expr &body body)
`(while-func #'(lambda ()
So you can now write something like this loop, which prints numbers from 0 to 9:
(let ((i 0))
(while (< i 10) (print i) (incf i)))
Note how the while body can still refer refer to the local variable i, even though our implementation choice was to package up the expressions and use a function. This is the crucial difference, which sets this apart from the solution that uses functions only. Nobody would use your proposed while loop class, because they would have to carve their program into functions in a completely stupid way, with no access to local variables. Even if you had closures in the language, people wouldn't use it; if you gave a Lisp programmer the above while-func only, he or she would find it necessary to invent the while macro to actualy make it easy to use.
Now to respond to your comment:
> But since there's already a built-in while, what was with the stupid fake example?
Sorry that I touched some sore nerves. I just wanted to pick a very simple example of an extremely simple control abstraction that cannot be implemented in these languages; it's not relevant that they already have it, because the implication is that it's impossible to make other abstractions that they do NOT have.
>What are you trying to prove? That these languages are geared towards efficiency and
>readable syntax instead of generalized object-oriented programming? Well, if so
>you're right.
Not at all. The point is that they have limited abstraction-making ability, because you are stuck with one rigid syntax. I won't respond to your remark about efficiency, whatever you mean by that. (Execution efficiency? Programmer efficiency?)
When you have a rigid syntax, the language is good for certain domains. When you try to solve certain problems, though, the rigidity will get in your way. You may have readability at the microscopic level, due to the use of a small repertoire of built-in syntactic forms, but that readability will be drowned in the morass of code that you will have to crank out. Remember, assembly language is readable too. You have a few instructions, a few addressing modes and everything is in nice columns. But once you crank out a large body of assembly language, it may still be readable, but it's not *grokkable*. Whereas the corresponding C program may be quite grokkable.
Ridiculous List (Score:4, Insightful)
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
Run for cover! PHB on the loose! (Score:4, Insightful)
Your boss is most likely a tech ignorant (or worse tech wannabe) that has no business diticating a list of requirements like this and, from the sound of it, has no experience shipping software. If all of these are hard and fast requirements, then C++ fails to make it on the Garbage Collection and advanced error handling, Java fails on the multiple inheritance and operator overloading, and VB.not and C-Hash fail on the cross platform (unless the M$ shills in the audience can point me to the respective Mac || *NIX compilers for them AND assoc. libraries). Don't even get started on the IDE issue - nothing like a three way flame war between DevStudio sheep, Emacs evangelists, and VI virtuosos. If you're even thinking about dictating an IDE for developers to use, you're going to be in for a real fun time.
Languages/platforms don't even get chosen in for-profit software endevors because they meet a laundry list of requirements like this. For better or (usually) worse, there's the practicality of developer experience, cost of maintainance (inc. compiler/ide licences), and above all market perception (just try to go off and sell that great tool written in Sather with TCL/TK UI bindings that runs on any *BSD desktop).
Despite this, it's not the things ON the list that disturb me, it's the thinks left OFF the list. No specification of multi-threading support? No question about parsers for XML? Don't need a networking library? How about ODBC drivers? What about support contracts or consulting rates if you run into a big problem and need a hired gun? And dear GOD why the HELL is there no mention of automated build and testing harnesses for any of it?!?!?
See what you can do to get a boss who's been through an actual product lifecycle. Otherwise, get ready learn what "deathmarch" means firsthand.
Why just one language? (Score:3, Informative)
So, here's my list
Does such a thing exist??? Every language has an IDE. Visual Studios, JBuilder, Emacs, KDevelopers, etc.
Well, this really depends on the operating system. Java's the good place to go here. If that can't be done, GTK and Qt are good libraries and they use the standard X style callback mechanism which is so much nicer than message based systems. What your really looking though is for a WYSIWYG GUI designer so I'd recommend Glade or whatever comes with the IDE you go with.
Such a buzz word... Java and C++ both use exceptions. Good error handling has more to do with a projects design though and not really the particular language...
Lets get our terminology right
IMHO, MI is necessary for advanced projects but Java interfaces _almost_ make MI unnecessary. You may do well to evaluate whether you truly need MI. What really matters, is how good your development team is.
This really should be in Java if you ask me but it isn't. You really don't need it. You could use interfaces instead. Of course, C++ support for operator overloading is great. Again though, you should really evaluate if you truly need such an advanced feature. If you just going to use it to concat strings then you don't need it.
Java or GCC. C++ is portable as long as it's GCC on both platforms
I think I'd have to agree with the general sentiment that you really need to evaluate your requirements because they are extremely unjustified and appear to be either (1) a bad manager, (2) pressure from employees to obtain "resume builder" skills, or (3) a very complicated project which you are not providing very much required information for
No language can satisify all your requirements perfectly. C++ comes closest. A combiniation of C++ and Java would do the job nicely.
Just a quick point... (Score:3, Informative)
However, operator overloading is simply syntactic sugar and can be supplied either through an advanced IDE (I may look at jEdit to see how hard it would be to implement there) or through a preprocessor (jpp is one such preprocessor, though it seems hard to find on the net these days).
When doing operator overloading, it would be good to eliminate temporaries if possible. If a 'c' array object already exists before the assignment, it would be nice if "c = a + b" generated "c.assign(a.plus(b))" rather than the naive "c = new Array(a.plus(b))", which causes heap thrashing and unnecessary overhead. My guess is that this kind of optimization would be easier with an IDE type approach. (I hope that made sense!)
299,792,458 m/s...not just a good idea, its the law!
Kylix (Score:3, Interesting)
-John
programming languages are engineering tradeoffs (Score:5, Informative)
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.
Garbage In, Garbage Out (Score:4, Insightful)
We have a CLASSIC boss who just wants to be buzzword compliant. I mean, look at that list. Reminds me of all the
So make *SURE* your boss who is making these technical decisions really has the CS degree he has to have to make them.
There are countless books out there on doing it right. Some key points are:
- Reuse knowladge of your team.
- If you think starting from scratch with 300 buzzwords will make a better product, think again.
- Reuse work that has gone before. If you've listed every major language and found they don't have what you want, perhaps there is a reason. Perhaps folks who designed Java/C# actually thought for a few minutes before they designed the language.
- Boss can make the decisions about goals, money etc. Make sure the folks making the technical decisions are stakeholders (ie, have to live with it). Why is the boss making this vs the lead developer. He'd better be the guy who'll be coding the most.
- If you specify the tool you're going to use before laying out the problem, if you pick a hammer you'd better hope the problem is nailing nails and not playing Bach.
- Give standardized/open source languages a shot (C++/C#/etc) before propriatery (Java etc). - They've renamed Ask Slashdot to Ask to Be Called a Fool. Why? Because folks posting in tend to be. You'll get great advice though, especially with respect to programming/development.
Sounds like this company is virtually certain to built the garganutan pile of multi-inheritance pile of crap folks who end up having to maintain will loathe. I happen to dislike multi-inheritance except for a relatively limited arena of problems. That's just a personal opinon though.
Wrong question (Score:5, Insightful)
If I was picking a programming language from scratch, I would pick a very simple language, such as Python [python.org] (which actually meets most of the boss's criteria) or Smalltalk.
Like most everyone else, I advise you to ask the boss what he really wants, or at least what's behind his wish list.
Java is the langauge you want (Score:5, Insightful)
Multiple Inheritance: People claim that this isn't a good feature, but I disagree. I've run into times writing Java code where MI just obviously would be the right thing to do. However, A) these cases are rare, and B) there's always a workaround which is almost as good as the MI solution. In trade, not having MI has the added bonus of making your code simpler to understand, but most importantly, preventing people who think they know what they're doing (but don't) from using MI to make a complete mess of your model.
Operator overloading: I left the best for last.
I've seen and suffered through abuses of operator overloading often enough to become convinced that it's important not to have it, so that less-than-gifted programmers will never be tempted to use it.
So I say again, unless you're doing anything inordinately complex with audio or video, use Java. Or use a worse tool, and suffer like everyone else does.
Delphi (Score:4, Insightful)
I am sadened by the fact that nobody cares about Delphi, and that the only comments that mention Delphi aren't moderated up. I have used many languages (and I was impressed to see that this person mentioned looking at Eiffel, a nice language).
First off I have to say this, even at the risk of being flamed and called a troll. Either the geek culture is just ignorant, scared, or both. Stop feeling so insecure to the point where you have to use a difficult language to boost your ego. What I mean is try using a language that actually makes your life easier. I am so annoyed by these people who suggest C++. I have many years exprerience in C++ and let me tell you that it is not exactly your best friend on large projects, especially with coworkers who do not know the pitfalls of C++ programming.
Also, all you people suggesting ruby, or other new and/or obscure scripting languages, please give me a break. I like cool languages like Lisp and Snobol as much as the next, but I must admit to the reality that no real business and business project is going to go with these languages as the main development tool. There are some business that use Lisp and Smalltalk, which is cool. However, the reality is that the dominant language is C++, Java, VB, and maybe even C#. Stop suggesting languages that no clueless boss is ever going to approve of (cluesless bosses only know to use C++/Java, the buzzword language).
Now on to Delphi. Delphi is what you are looking for. First off, your requirements list is too unrealistic. You are going to to have to make some trade offs.
Delphi doesn't have operator overloading. Guess what? That is not critical. What's the difference between a + b and a.Add(b)? None.
Delphi doesn't do multiple inheritence. Guess what? If you are a good enough OO designer, you won't need it. Delphi supports single inheritence, multiple interface implementation style, just like Java and Smalltalk. So don't give that shit that multiple inheritence is needed, it is not.
Here is a quick OO design tip. I have noticed that C++ programmers like the multiple inheritence because they can have a class inherit from one class to gain capability, and then have it inherite from another class to establish communication (usually through an abstract interface). THIS IS A MISTAKE!! Golden rule of thumb, favor aggregation over inheritence. I am not going to exlpain myself on this (it would make this post too long). Take it from me, I have seen this in real projects, don't use inheritence to establish communication between objects. Use inherietence to vary state/behavior of a particular entity. Net result, designs such as these do not require multiple inheritence and are far more flexible and reusable.
Delphi is natively compiled, not like that p-code shit VB does. Delphi is made by Borland, which employs some of the brightest compiler designers around. Delphi is far more efficient than C++.
I have used C++ most of my career and I am still learning Delphi. I was skeptical of Delphi at first. But I gave it a try and did performance tests. For example, Delphi's for loops kick the shit out of C++ for loops. Another examle, Delphi's TList kicks the shit out of the STL vector and list containers. Don't be so ignorant, give it a try. I DARE YOU ALL YOU TROLL GEEK C++ PROGRAMMERS WHO FIND IT EASIER TO SAY DELPHI SUCKS RATHER THAN TRY IT!!
As for GUI, no contest! No contest!. You know easy VB is with GUI development, Delphi is even better (with more components by default than VB). People have mentioned Qt. I like Qt. It is orders of magnitude better than MFC (which is the WORST LIBRARY IN THE WORLD!!). But Delhpi's VCL is better than Qt.
Delphi does not have garbage collection. That is ok, its interfaces are automatically reference counted
I thought that Delphi would not be portable, but it turns out that Borland implemented something to simulate a lot of the Windows stuff under Kylix. As a result, porting should not be hard. I will not say that porting is a snap. I would be lying. However, porting should not be that bad, but YMMV.
End result, I used to love C++. But after using many other languages I started to despise C++. Delphi was the language that made me loathe C++. I do respect Troll Tech for making an excellent product. Qt is very impressive, but MS's MFC library is the cold reality that C++ is very deadly in the wrong hands. Visual C++ with MFC has to have caused more project slippage/failure than any other language in the history of programming (well, that is my opinion). I dare anyone to check out Borland's case studies of Delphi. Check out Deja news list of compilers, where the programmers got to vote. Delphi, despite probably the least used langugae, was voted number 1, followed by Borland's C++ Bulder. Visuall C++ and VB were at the bottom of the list with negative comments too!
Delphi/Kylix/C++Builder (Score:4, Informative)
I work with Delphi on a daily basis. Delphi supports (fully) all of the following:
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
What Makes a Powerful Car? (Score:4, Funny)
Try Ada-95 (Score:3, Informative)
URLs To backup my bald assertions below. Browse the sites and you'll see studies and numbers. Facts not Religious opinion. Adapower [adapower.com] is a good start. Or the Ada Information Clearinghouse [adaic.com]
IDE - there's a variety of freeware ones.
Simplified GUI - there's a variety of bindings to various APIs, from X-windows to SWING to W32. Plus many other simplified freeware ones, some thin, some thick. Pick which one is most appropriate. Ada (the language) doesn't have anything more advanced than stdio - but then again, neither does Java, it relies on the awt and swing libraries *shrug*
Advanced Error Handling - Java's exceptions contain more info than Ada's. Ada ones are more simple, easy to use, but I think Java's are better in most ways. They should be - both C++ and Java copied their exception handling from Ada's 1983 incarnation. OTOH most of the time all Java programmers (like me) do is make an exception without using any of the internal data, so YMMV.
Advanced OOD including multiple inheritance and abstract classes - As regards OOD. Ada's the most flexible of the lot. You can do strict OO, but don't have to. Methods are properties of Classes(actually packages) rather than objects, so you can say Wooden.paint(a_wooden_door) or Door.paint(a_wooden_door) rather than a_wooden_door.paint(). So you get all the advantages of multiple inheritance, without the horrendous penalties (which method are you inheriting, the paint for wooden things or the paint for doors?). Abstract classes are used all the time.
Garbage Collection - Ada doesn't produce garbage in general. You can do most things using statically allocated memory, or dynamic allocation within a statically-defined garbage-collected area. When you want dynamic allocation, you can choose to rely on the compiler's garbage collection, if it exists, but you're also given tools for explicit disposal of garbage. Note that Java has true garbage collection, but even Sun says that you can't rely on it, you should use explicit disposal. This is true not just for Java, but in general.
Operator/Function Overloading Ada has had this since 1983. Often copied, never bettered
Portable Stories abound of million- and 100,000-line Ada programs that require a dozen lines changed to make em work on different systems. My own personal war story is of a 20,000 liner developed on a 386 on an Irvine compiler, ported with 3 lines changed to a MicroVax using a DEC compiler, thence to a Vax using another DEC compiler, then to an embedded system using a DDC-I compiler. Was an AI to do anti-missile defence, people's lives depended on it. It's been in service since 1995. Cost less to make than the 7,000 lines of C in its test bed too. I've just help finish a 20,000 line piece of spaceflight avionics that makes not one Operating System call, even though it has 60+ simultaneous threads of execution. Oh yes, there's a shareware (or GNU licence? I forget) Ada compiler that produces Java bytecode, so will run on any Sun JVM.
So why isn't Ada-95 used by anyone? Because everyone knows it's too big (nearly as many keywords as C++,), needs a huge machine to run (bigger than a 286 running at 4 MHz - which was big in 1983 when Ada-83 was invented), it's designed by a committee (like Linux - one really good designer Jean Ichbiah, then peer review), and it's a product of the US Military (like Unix, and the Web - designed for not by). Oh yes, and expensive (GNAT is open source...) and uses a lot of risky concepts ( to wit, Operator Overloading, Object Oriented Design, Exceptions, all risky and untried in 1983 ). It's also obsolete, (the Ada-95 version being a little younger than C++). And it is used, for Avionics of all modern airliners ( Illyushin, Boeing, Lockheed, Airbus) and many satellites, railway- and air- traffic control systems, where quality is vital. It's not used much elsewhere, as there's a vested interest for software developers and programmers to keep software buggy (so they have job security) and quick to market (it takes a long time to develop reliable software).
So Ada's perfect, right? Wrong. It's just better than most general-purpose languages for many purposes. BUT It's not language of the month ( C# this month? ) so getting Ada programmers is very difficult. Though it's easy to learn, based like the similar Eiffel, Delphi, Object Pascal and Modula-2/3 on Pascal. If you've programmed hardware design in VDML, or used Oracle's access language, you've used Ada without knowing it.
Re:Try Ada-95 (Score:3, Informative)
> Simplified GUI - there's a variety of bindings to various APIs, from X-windows to SWING to W32.
Increasingly popular for Ada is GtkAda [act-europe.fr], a thick, well-documented, OO binding for Gtk+. It is portable between *n*x and Windows.
> Garbage Collection
IIRC, the language spec makes garbage collection optional, and almost no one implements it.
> So why isn't Ada-95 used by anyone? Because
"Designed by committed" is the sort of argument prejudice evokes when there aren't any real arguments. People use stuff designed by committee all the time withoug whingeing about it. The argument ought to be about the design, not about the designer(s).
Re:Why doesn't... (Score:3, Informative)
Re:Why doesn't... (Score:3, Informative)
Re:Why doesn't... (Score:2)
Re:Java Interfaces (Score:3, Informative)
Several other people have addressed the issue of callbacks, but I am interested in talking about your assertion that interfaces are only for callbacks. Interfaces are contracts that are at the heart of polymophism, a client doesn't care "what" your object is as long as it provides the services you need.
Others may disagree, but in my opinion, multiple inheritance in C++ is the result of confusion between polymorphism and reuse on the part of the language developers. If you want to reuse multiple objects and also provide similar services to two or more of those objects it is much clearer to the observer of your code if those parent classes implement interfaces describing their services and you include instances of the classes you need as private member variables and you delegate to those private member instances in your implementation of the interface methods that you need to provide.
I think this is much better than having tons of confusion over similar method names with grossly different semantics, figuring out which parent class a virtual method is tied to, dealing with virtual vs non-virtual inheritance, and the tons of other things that make deciding through inspection who exactly implements the bar() method on your class foo next to impossible without having 4 monitors.
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:Why doesn't... (Score:2, Insightful)
I have found that being able to do multiple inheritance often leads to more confusion than help when doing software development.
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:Well...personally, (Score:4, Funny)
(/ (+ (exp a b) e) (* c (+ d (+ b (+ a b)))))
:)
Re:Why doesn't... (Score:2, Insightful)
Java or C++ is probably the best fit for the job, especially when portability is a concern.
Re:Why doesn't... (Score:5, Insightful)
Please note, I do 90% of my professional programming in C++ -- I'm no Java zealot, but I do have issues with the idea that Java is somehow broken because it doesn't support these features.
Java doesn't have multiple inheritence because it doesn't need it. Though there is some debate on the subject, the vast majority of people who have a lot of experience doing OOP will tell you to avoid multiple inheritence at all costs. It exists in C++ because there's no root 'Object' in C++ (not pure OO) and therefore you sometimes need MI to bridge gaps between two different libraries that wouldn't exist if every class derived from a common base class. Multiple inheritence is confusing for the programmer and sometimes even confusing for the compiler (name collisions). Use it only as a last resort. Don't use its existence as a basis for picking your language! That's just ridiculous.
Operator overloading is less clear cut. While I must admit its nice to have matrix or vector (eg, 3d coordinates, not arrays) classes that you can just add using the + operator, operator overloading is so often misused that I'm inclined to think in general its not such a good idea. Of course I don't feel nearly as strongly as this as I do about MI, I could take operator overloading or leave it.
Anyway the real point of my post is to encourage the original person asking to rethink what it is that makes up a powerful OO language -- don't look at the bullet-point features (in short all you did was list what C++ can do; no other language will completely fit the bill), look at the principles behind the language and how well it supports OO concepts in their generalized form!
Re:Why doesn't... (Mod him up to a zillion!) (Score:3, Insightful)
It's a kludge to bridge some of C++'s implentation problems, namely that its kinda silly to have an OO language without a global base type (of course, I realize that C++ was to take advantage of the fact that everyone knew C). MI creates more problems than it solves, which is why it should remain the kludge it is, never to be included in a language design spec every again (although I'm sure it has been).
I do, however, have to disagree with operator overloading. I feel that due to, historically, how we notate math, it's very natural for programmers to want to do operations on objects of similar-types in the A+A way. Until we start doing math in reverse polish notation, operator overloading can save crudloads of space and do wonders for the readability of code, although his points about it being misused (or 'over'used, haha) often are dead on.
Of course, try explaining this to the CS grads equipped with a hammer coming out of school
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.
Re:Why doesn't... (Score:3, Insightful)
I don't this there is a language that truely means the bill. There may be a RAD (Rapid Applicaiton Development) tool that does meet the requirements. If it is on the Windows Environment, try C++ Builder. If I remember correctly is supports most if not all of those features. It has been a while since I did anyhting in it. Delphi (object Pascal) might also fit the requirements. Both are from Borland.
Borland adds some stuff to C++ Builder to make it as easy to use as Visual Basic interms of GUI & IDE, but it still maintains the power of C++. They have an event model for most of there classes they provide. In truth, C++ Builder is everything Visual C++ should have been. Try C+ Builder.
Other than that, don't look specifically at languages because rarely does a langauge specification include the IDE and GUI aspects. You need to look at the tools used to build programs in that langauge. You need to find a tool that supports RAD (rapid application development) becuase the requirements you listed are a lot of the stuff that goes into a good RAD tool (like C++ Builder). Delphi is the fastest and most powerful way to develope applications for windows and I think C++ Builder is next. Then VB, but vb is only a pseudo-OOP BASIC, and let's face it, BASIC wasn't all that powerful. Best of luck.
Better still, Python's successor (Score:3, Informative)
All of the above in sensible doses. Plus it's more fun. And a prettier colour. (-:
BTW, XP isn't a cheap ripoff, just a clumsy one. I suspect that the TCO will work out noticeably worse than WinME. Windows started life without scaleable elevators (to pick a known example) because one William Henry Gates III told the developers to take them out again so that it looked more Mac-like. Dilbert of a few days ago [dilbert.com] is fitting commentary.
Dons asbestos undies, prepares to duck...
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.