Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
I don't feel that Java has any business at all being a server language. For simple things that are mostly IO bound, it's great. But when you need some real power behind it, it lacks heavily.
As I said, I used C++ for well over half a decade. It was ideal for the AI/image recognition/image processing apps I was writing then. I'm not disputing that some apps need something like C++ or C or assembly code.

But to say Java lacks real power? Because... why again? No pointers? It would seem that you're unfamiliar with it if you think it is underpowered compared to C++. And having written a fair amount of Java-based server code, and having used a fair amount of Java-based server apps, you're clearly wrong when saying it has no business there. You seem, again, to base it all on speed without any real argumentation as to why that would matter - look plinden's post, and my experiences are similar. Java is often a much better business decision because it's cheaper to use.

When speed or raw efficiency or access to native functionality or real-time needs are paramount, then, in many cases, C++ is a better choice. But you continue to argue it's better simply because it's faster and has a smaller memory footprint, and you continue to ignore any comments that, in these days where the cheapest CPUs you can buy easily exceed 1GHz, speed isn't all it used to be.
darkwing said:
I'd rather have top-notch people developing an app that will run fast and be efficient than a bunch of mediocre people basing their language of choice on what's easier for them to grasp.
Wouldn't we all? Of course, this does nothing to advance your argument. And at least it's nice to hear you admit Java is easier to grasp. Obscurity is never a plus. I've coded in Symbian, and the fact it's got excellent access to the phone hardware doesn't in any way counteract the fact that it's exceedingly poorly designed.

I still have a lot of love for C++ and other languages. I don't think Java is the be-all and end-all of languages. It isn't. It's bloated compared to a lot of other choices. It takes longer to start up. It has a number of weaknesses. But... to say that it's inappropriate for business/server apps is simply wrong. That's exactly where it's most suitable. Consumer apps? No. Games? No. Scientific visualization? Not so much. Agreed.

I don't mind that you prefer C++. I just wish your defense was better than "it's faster and smaller." What language features make it superior?
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
But to say Java lacks real power? Because... why again? No pointers? It would seem that you're unfamiliar with it if you think it is underpowered compared to C++. And having written a fair amount of Java-based server code, and having used a fair amount of Java-based server apps, you're clearly wrong when saying it has no business there. You seem, again, to base it all on speed without any real argumentation as to why that would matter - look plinden's post, and my experiences are similar. Java is often a much better business decision because it's cheaper to use.

I guess I'm not making myself clear.

People who find Java better because it's easier to use are incompetent and have no business whatsoever calling themselves engineers. Or rather, no decent company who cares about the performance (especially look and feel) has any business hiring them.

When Java becomes "cheaper to use" or a "better business decision" due to inept employees it's time to re-think the business all around.

And why does speed matter? Gee, I don't know. :rolleyes:

I guess it's time to simply agree to not see eye-to-eye on this one and move on.
 

Xyl

macrumors regular
Dec 30, 2006
181
0
I guess I'm not making myself clear.

People who find Java better because it's easier to use are incompetent and have no business whatsoever calling themselves engineers. Or rather, no decent company who cares about the performance (especially look and feel) has any business hiring them.

When Java becomes "cheaper to use" or a "better business decision" due to inept employees it's time to re-think the business all around.

And why does speed matter? Gee, I don't know. :rolleyes:

I guess it's time to simply agree to not see eye-to-eye on this one and move on.

I found it hilarious that you decided to throw out the term "Java fanboy" out there. What a hypocrite? It looks like you're a "C++ fanboy". As noted by already several billion posts in this thread, speed is not always the #1 issue. It's called compromises - performance is always an issue, but not always the #1 issue - there's other constraints such as development costs, development times, multi-platform requirements, you could go on and on - it seems like you don't get it, you keep talking as if performance is the #1 issue for all applications (every single one) - it's not, and you should start drilling that into your head.

Edit: You need to get out of the engineering side and venture more into the business side. You have no idea what you're talking about. "Better business decision" and "cheaper to use" does not equal to inept employees. I don't even know where to start on this issue...go read a book (yes even that will help), talk to some higher management business people that actually balances the books and pays your salary.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
I found it hilarious that you decided to throw out the term "Java fanboy" out there. What a hypocrite? It looks like you're a "C++ fanboy". As noted by already several billion posts in this thread, speed is not always the #1 issue. It's called compromises - performance is always an issue, but not always the #1 issue - there's other constraints such as development costs, development times, multi-platform requirements, you could go on and on - it seems like you don't get it, you keep talking as if performance is the #1 issue for all applications (every single one) - it's not, and you should start drilling that into your head.

Edit: You need to get out of the engineering side and venture more into the business side. You have no idea what you're talking about. "Better business decision" and "cheaper to use" does not equal to inept employees. I don't even know where to start on this issue...go read a book (yes even that will help), talk to some higher management business people that actually balances the books and pays your salary.

Yes I am a c++ fanboy. Is "fanboy" a derogatory term? I use "fan" as someone who likes something and "fanboy" who likes only that one thing out of a group of possible choices. (Or at least in the realm of comparison.)

I don't need to read a book as I've been in the industry for 10 years and have seen all I need to see. If you have a team of total c++ experts, you'll get the job done just as fast as you would in Java, have good maintainable code, and it'll run faster. Much faster. Every time. When you don't have said experts, I guess Java is all you can manage to use.

Why do I like and use Java?

1) Good library of existing classes.
2) I can make a simple GUI app for a Windows friend without needing to use Windows myself.
3) Interfaces as opposed to multiple inheritance of ABCs makes for good design.

Why do I hate Java?

1) Debugger takes forever to load.
2) The program itself takes forever to load.
3) Huge memory hog.
4) Slow slow slow.
5) No real "protected" (c++ meaning) members without making each class its own package. Ugh. (If I'm not correct here, please educate me as I'd really like to know for future use.)

I think that Objective-C can be a good compromise as its runtime cost is much smaller than Java's.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
I heard a saying some time ago which I think is pretty appropriate for this thread. It goes something like this:-

If all you have is a hammer then pretty soon everything begins to look like a nail.

I guess what I'm saying is that it's a good job there are so many programming languages out there and that the 'best' language, like the 'best' tool in a tool box, is the one that is most appropriate for the taks in hand.

As much as I love C++ sometimes, for whatever reason, Java is a better choice. I'm currently working on 2 projects, one in C++ and the other in Java and I wouldn't want to swap the languages around for either project.

happy coding!

b e n
 

Xyl

macrumors regular
Dec 30, 2006
181
0
I don't need to read a book as I've been in the industry for 10 years and have seen all I need to see. If you have a team of total c++ experts, you'll get the job done just as fast as you would in Java, have good maintainable code, and it'll run faster. Much faster. Every time. When you don't have said experts, I guess Java is all you can manage to use.

You obviously did not get my point. Not every single company out there (especially smaller startups - and all companies were a start up at one point or another) has the finances to hire 10 C++ experts with 20 years of experience - and as I said before, requirements determine the language, not performance...performance is only one requirement (and it seems you're stating performance as the #1 issue yet again). And depending on requirements, it can be cheaper to develop in Java and still be sufficient, especially when performance is not the #1 issue.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
You obviously did not get my point. Not every single company out there (especially smaller startups - and all companies were a start up at one point or another) has the finances to hire 10 C++ experts with 20 years of experience - and as I said before, requirements determine the language, not performance...performance is only one requirement (and it seems you're stating performance as the #1 issue yet again). And depending on requirements, it can be cheaper to develop in Java and still be sufficient, especially when performance is not the #1 issue.

Yes this is true not everyone can hire experts. However, people who only feel comfortable in Java and find c++ "too hard" should find a new career choice, imho.

My main point for using Java, which is writing things friends can use on Windows, is kind of hindered now since MS and Sun can't play nice and a JRE is a separate download. :mad:

I'm going to start messing around with mono one of these days.

I much prefer Java to C# but I find C# is better suited for GUIs.

Java gui:

http://madbean.com/anim/totallygridbag

(for those who haven't seen it)
 

hsvmoon

macrumors newbie
Jul 31, 2006
24
0
Huntsville Al
Ignore all of this fanboy mess.

If you need nothing but pure speed NO language can beat optimized ASM, but if you do not have the rest of your natural born life to code the program you will pick a higher level to work at. The next level of speed would be pure procedural like C, FORTAN, or similar. The next level would be C++ or similar. The top level stuff like JAVA, PERL, RUBY, or similar take very little time to develop new applications. The main idea is you trade speed for easy to code. Most applications do not need to be optimized for speed so much as to dictate what level of language you use, but they do need to be early to market.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
If you need nothing but pure speed NO language can beat optimized ASM, but if you do not have the rest of your natural born life to code the program you will pick a higher level to work at. The next level of speed would be pure procedural like C, FORTAN, or similar. The next level would be C++ or similar. The top level stuff like JAVA, PERL, RUBY, or similar take very little time to develop new applications. The main idea is you trade speed for easy to code. Most applications do not need to be optimized for speed so much as to dictate what level of language you use, but they do need to be early to market.

I was given a board on a Friday and told we needed a demo by Monday. It was an ARM/9 board with an attached LCD and touch panel. By Saturday night, I had compiled Linux/RTAI, used my re-usable and portable c++ gui classes to create an interface, wrote a driver for the touch panel (in C), and had a working demo. Now I'm not saying that this is the sort of thing Java is used for, however it is an example that C++ can be re-usable and flexible just like Java and bring applications up quickly. Java is better at forcing this on you, but it certainly can be done.

Compilers are good enough that C can come close to optimized ASM, but not always. I do a lot of inline ASM myself when projects aren't supposed to be portable.
 

rtharper

macrumors regular
Sep 6, 2006
201
0
Oxford, UK
Yes this is true not everyone can hire experts. However, people who only feel comfortable in Java and find c++ "too hard" should find a new career choice, imho.

I don't think ANY said C++ was "too hard" for them to use. We've all used it successfully. Personally my problem with C++ is that it's in a class of languages whose implementation I disagree with and prefer not to use. From an engineering standpoint I see the need for C++. I also know this: from a programming language design standpoint, which is completely valid and something you have yet to address, the goal of any programming language is usability and clarity. I think C++ has this to a very limited extent, and many other languages, because of their abstraction, provide this much better. The trade-off? Performance. But somehow, the success of not just Java but Perl, Python, Ruby, Lua, and LISP tell me that oftentimes people are okay with that for certain problems.

It is a fact, C++ is not the best for everything. That claim does not mean I can't use it or anyone else thinks it's too hard. If you want to get into the nitty gritty, write in pure C or ASM. I've done both and can tell you I don't think I gained much by using C++ except better scoping, which is all it provides because that's all the OO paradigm is--a sophisticated implementation of lexical scoping rules. In the case of C++ AND Java, the syntax they require to implement these rules is ridiculous, but it's also all we've got.

Once again, you never addressed the issue of how complex your understanding of concurrency is, which is a major reason that Java is used in Enterprise level applications. You never addressed how you managed to have models that "design themselves" when the rest of the world, including the upper echelons of academia, have devoted significant time to correctness proofs and modelling in this area. If you've never had to make sure a program was provably correct, then you may have maintained several apps of 100K lines of code, but I wouldn't want it running on any server I owned. This is a major issue in cross platform development because so much of it--processes, threads, semaphores, etc, are platform specific. And you also never addressed issues on cross-platform usability that many people, including myself, mentioned, only claiming you have experience on them.

You can attack Java, but I'm not defending it. I'm actually responding to the attacks you make on programmers that dislike C++ and sometimes prefer Java in probably a much more well balanced view than your own. The fact of the matter is that people that don't always prefer C++ are neither less intelligent nor less skilled than you, and I would actually suggest the opposite, as you seem to only be able to think it terms of C++ and object oriented program, or perhaps that's all you have experience with.

You also have failed to make the distinction between platform and language. C++ is a language. Java is language and an associated platform. So is c#. The fact that you must program in C++ for a given platform, and that there are so many out there (Win32API, Qt, GTK, just to name a few) makes it a less attractive option for some instances because of the lack of standardisation.

Basically, all you've responded with is "zomg if you liike java ur teh dumbs0rs, c++ is teh only language!" despite concessions to your argument that C++ has a place in the world of programming. If you pushed out all other programming languages and paradigms, you'd find that many of the technologies you use today would be done for, including Yahoo, whose first software was written entirely in LISP and they still maintain much in LISP today.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
Concurrency: at a bare minimum, (with little thought) can be done safely with recursive mutexes acquired in the same order with some mechanism to prevent priority inversion. Yes, there is nothing in C++ built-in that does that.

Cross platform: plenty of libraries are available for c++ that allow gui development, regex, and a number of other things. Just take your pick.

Proving something is correct: I've been in the medical device industry for over 8 years, and you think I've never had to sit down and prove that something will be safe by design? If I'm wrong I can go to jail. Not doing this is a priority for me. :rolleyes:

C++ is the best compromise right now in my opinion for design ease and flexibility vs performance. I agree there are many parts of the language that are sub-par. I don't much care for the STL. It's powerful but not intuitive. (For example, you can use a std::vector and have your code compile and run, but have problems with erase() unless your contained class implements copy constructors and assignment operators, which isn't required because of their implicit functionality.) I don't at all care for the fact that most of the C library doesn't handle re-entrancy and modern attempts to do this feel like hacks.

I'm starting to become a bigger fan of Objective-C and feel it's much better than Java in many ways. However, it seems the industry support for it is poor.

When you trade performance for ease of design and flexibility, then programmers get complacent. If things don't run well, then just buy more servers and more expensive hardware. That'll solve it! I shudder to think what the next 20 years of software innovation will look like compared to the last 20 years as hardware gets more and more powerful. I think highly skilled people who are capable of writing fast, streamlined efficient code will go by the wayside.

Of course, these skills have always kept me in a job. :cool:

BTW, my suspicion is that when you ask me to explain my understanding of concurrency that you're dealing with something I haven't before. I'd love you to go more in depth on that. Also, the two 100k+ applications I maintained were medical device device code. Embedded linux stuff. One of them had about 24 threads (mostly IO bound) and the highest priority was actually a sound driver that output digital data or DDS-generated tones at 8000 Hz to a dac. I love that little driver. :)

Oh, and Java couldn't hope to do that. Let alone RMS scheduling with hard deadlines.

Oh, and as for your LISP statement. When I took my graduate AI course, the teacher said she preferred python but left it up to us as to what language we used. I took this as an opportunity to learn python and loved it, but man is it slow. An AB tree based checkers game of mine worked great but when the depth was set to 80 or so it could take several minutes to figure out a move. Such is the nature of exponential growth algorithms, though. Reasonable with n=10.

So what do you think about LISP vs Python for AI?

It'd be hard to do AI on C without self-modifying code and being platform specific. You could do it, though. Good thing there are LISP->C converters. (No experience with them though.)
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
I'm starting to become a bigger fan of Objective-C and feel it's much better than Java in many ways. However, it seems the industry support for it is poor.
Not that I don't want to keep the thread as antagonistic as it has been ;), but: have you seen the Objective-C improvements coming in Leopard? Pretty nice (although perhaps the garbage collection would not be to your liking). And Xcode is finally starting to grow up and get some big-boy features to support some of those changes.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
Not that I don't want to keep the thread as antagonistic as it has been ;), but: have you seen the Objective-C improvements coming in Leopard? Pretty nice (although perhaps the garbage collection would not be to your liking). And Xcode is finally starting to grow up and get some big-boy features to support some of those changes.

Actually the garbage collection is OPTIONAL, which I absolutely love. While I don't appreciate people who appreciate GC, it should get a lot more users on board for Obj-C and I think this will be a huge benefit overall.

I am anxiously awaiting Leopard and the new XCode and have been salivating over it for quite some time. :cool:

I actually like Objective-C's memory management model rather nicely, and proposed a C implementation of it for a project currently being worked on here in C.

Oh, I forgot to answer something in a previous post. Code that "designs itself." It's pretty simple to implement a reference counting mechanism (see above) or keep track of a pointer once allocated in a list somewhere. I implemented my own version of something I found out was implemented in boost's shared_ptr (before I ever heard of boost) that was STL safe and managed reference counting. With a few simple rules to keep in mind while coding, it's pretty darn easy to manage memory.
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
I don't need to read a book as I've been in the industry for 10 years and have seen all I need to see. If you have a team of total c++ experts, you'll get the job done just as fast as you would in Java, have good maintainable code, and it'll run faster. Much faster. Every time.
I've been in the industry for 15 years and I still haven't seen all I need to see. But if you have a team of total Java experts, you'll get the job done three times faster than you would in C++ using one fifth the personnel, have good maintainable code, and it'll run just slightly slower than native code. Slightly slower. Every time.

For the jobs that Java is the best tool for.

You have been using the classic Artie MacStrawman arguments, arguing against some mythical Java fanboy whom I've never met in seven years of using Java.
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
I've been in the industry for 15 years and I still haven't seen all I need to see. But if you have a team of total Java experts, you'll get the job done three times faster than you would in C++ using one fifth the personnel, have good maintainable code, and it'll run just slightly slower than native code. Slightly slower. Every time.

For the jobs that Java is the best tool for.

You have been using the classic Artie MacStrawman arguments, arguing against some mythical Java fanboy whom I've never met in seven years of using Java.

You should go to my school then. Lots of those fanboys there.

Now you've poised an interesting question. Perhaps some form of contest to design a server that will run (or compile and run) on several platforms. Get a team of x number of people, each an expert in their favorite language, and see who can develop it faster using all tools at their disposal.

We have a team here of two people who maintain the Java side of things and they're both pretty smart guys. The amount of time they had to work on their stuff was no greater than the C# guys. We're doing the C implementation of this project and we have an even shorter deadline. I wonder how that worked out? I guess it can't be done and we'll be massively late on it. :rolleyes:
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
OP,

Don't learn C/C++ unless you want to work with people like darkwing :eek: Do you really think all these low level language comparisons mean jack to the OP? Are all C/C++ fanboys as thickheaded and belittling as you?

C# and Java are the two language skills that are most desired at the moment - search any job board for proof. It just depends if you want to bind yourself to Microsoft's domination (is that bad?) or work with a technology that spans platforms (mobile, embedded, server, and desktop) and various industries. Yes, the same can be said of C++, for the most part.

I'm a fanboy, but I don't claim Java is THE language by any stretch - in fact, I know a bit of C/C++, C#, Perl, Tcl, Ruby, and PHP. I only think in terms of $$$, and in my 10 years of experience - my Java skills been quite good to me.

The key will be your ability to adapt as the industry changes, languages seem to fall out of favor as new technologies are introduced. Having a solid foundation of design (OO AND Procedural) skills and problem solving ability should help, whatever language you learn really won't matter in the long run, since you will probably use more than one throughout your career.

Bottom line.

If you learn C/C++ you will make money.
If you learn Java you will make money.
If you learn C# you will make money.
...
...
...
 

jdechko

macrumors 601
Jul 1, 2004
4,230
325
2 different phones since 2003. My current phone (razr v3x) has crappy motorola software and no java games. (I think Motorola has the worst software people... just look at their cable boxes)

Are you on Verizon??? I thought that Verizon only supported BREW games and not Java.

Anyway, I think that the most important thing in programming as far as starting out is getting the syntax down. Converting ideas to logical explanations step-by-step has worked for me in the past. I've done very little coding compared to many of you, but logical statements are universal. After that, you just translate them into whatever language you're using.

BTW, I've done pseudocode (don't think it even compiles), java and AutoLISP (variant of lisp for AutoCAD).
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
I had another thought on all this. There's no evidence that I can find that proves Java is easier to develop on than anything else. This is just personal preference and perception. And as for what languages businesses choose to use, well, if managers are told by their employees that Java is the way to go then that's what they'll do. Good managers listen to employees and empower them to do the best job they can.

Fortunately for me I try to base my arguments off things that are easily qualified, namely the efficiency of the finished product. :cool:

And when I searched job boards to get this job (had to leave my last job to escape California) I found nothing but C++/C with Java/C#/etc a plus. Of course, I typed in the word "embedded" in the search field.

Whether I like it or not, I believe the industry is already moving more towards web-based interfaces for large scale enterprise products, and this means a lot of Java. I also believe that desktop programmers vastly outnumber embedded guys which is why I went this route. I got a big fat bonus to actually move here.
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
At a purely language level, Java has certain advantages over C++, and vice versa.
Java > C++:
Interfaces
Encourages inheritance by making final "optional" rather than "virtual".
Generics > templates
Some, however limited, support for introspection ("reflection")
No fragile base class problem
No pointer problems
Non-GUI programs can often translate to Objective-C on the syntactic, if not the lexical, level (case in point, I had a graph traversing program in Java. All it needed was a F&R for the class names, and a regex to go from a.b to [a b])
No "friends"
Garbage collection (I mention this because a language with no way to manage memory must have it, so it's as much a language feature as a runtime feature)

C++ > Java:
Operator overloading (WHEN USED PROPERLY)
Multiple Inheritance (I hate it, but Java doesn't have it)
slightly better scoping syntax (horrible as :: is to use and remember, dot-drill-down is way worse)
Java has no pointers
better access control syntax in terms of readability
class methods (though you wouldn't know it from the syntax alone)
Function pointers > functors
pass-by-X is explicit
procedural programming is available

That's without even getting into the libraries or runtimes.

Of course, Objective-C has them both beat in all three areas (except for Java in the libraries department, where it became tied when WebObjects went all-Java - AppKit is still way better than AWT or Swing), and will have Java beat on it's own terms (garbage collection) in 2.0. :D Elaboration on request; I've spent more time on this post than I should have.

That said, none of the above have: dynamic scoping, pass-by-name* (a good thing - I shudder to think about Intro to Programming students dealing with it), support for functional programming, prototyping, continuations, higher-order messaging**, and others.

*Well, Objective-C has it in practice, but only for selectors, so that doesn't really count.

**In Obj-C via library support, and/or a compiler hack, and/or a set of macros.

To sum up: if you want to start learning procedural programming, learn Pascal (or better yet, ALGOL or Ada). To learn Object-Oriented Programming, learn Objective-C. If you want to learn functional programming, learn LISP.
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
I had another thought on all this. There's no evidence that I can find that proves Java is easier to develop on than anything else. This is just personal preference and perception.
Yes, but it's personal preference and perception from, among other people, those of us with a great deal of experience using both languages as well as others. Your assertions that, in essence, Java is for dummies is what a lot of people are reacting to.
Fortunately for me I try to base my arguments off things that are easily qualified, namely the efficiency of the finished product. :cool:
I think this has been beaten to death. Efficiency of the finished product is not the prime consideration for a number of product areas.
Of course, I typed in the word "embedded" in the search field.
Well, duh.
 

rtharper

macrumors regular
Sep 6, 2006
201
0
Oxford, UK
To sum up: if you want to start learning procedural programming, learn Pascal (or better yet, ALGOL or Ada). To learn Object-Oriented Programming, learn Objective-C. If you want to learn functional programming, learn LISP.

Oh man, you had me on everything until you brought Ada into this ;).

What are your thoughts on Haskell or Scheme to teach functional programming?
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
I guess I'm not making myself clear.

People who find Java better because it's easier to use are incompetent and have no business whatsoever calling themselves engineers. Or rather, no decent company who cares about the performance (especially look and feel) has any business hiring them.

When Java becomes "cheaper to use" or a "better business decision" due to inept employees it's time to re-think the business all around.

And why does speed matter? Gee, I don't know. :rolleyes:

I guess it's time to simply agree to not see eye-to-eye on this one and move on.

If speed is all that matters, we should be using dumb terminals running FORTRAN applications. FORTRAN is still likely the most efficient language out there. It's definitely faster than C++ and so is C.

Of course, if we put C++ programmers on FORTRAN, there would be a lot more incompetent developers wouldn't there?

There are a lot of situations where Java is the answer and it's strong enough to do most anything but real-time programming.

That doesn't mean that C++ can't be an effective language in many cases but C++ is more likely to be misused by people who think they know what they're doing. Discipline is required to use C++ (and C) well. It's more likely that a good application will come from Java or Objective-C or Smalltalk simply because they require better coding.
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
Oh man, you had me on everything until you brought Ada into this ;).

What are your thoughts on Haskell or Scheme to teach functional programming?

Scheme's fine, though I think you lose something with only static scoping. Certainly a sight more readable than LISP.

Haskell's good for functional algorithms (I've yet to see a more self-explanitory quicksort), I think, but with monads and for loops, the idea that it's purely functional is put somewhat in doubt.

As for Ada, I mentioned it because it's got quite possibly the greatest flexibility of any procedural language, even if readability is only so-so, and writability is in the crapper. It's still without question an ALGOL/Pascal-derived language (C is a BCPL-derived, lexically), and one that has some continuing practical value.
 

jhande

macrumors 6502
Sep 20, 2006
305
0
Denmark
Haskell's good for functional algorithms (I've yet to see a more self-explanitory quicksort), I think, but with monads and for loops, the idea that it's purely functional is put somewhat in doubt.

As for Ada, I mentioned it because it's got quite possibly the greatest flexibility of any procedural language, even if readability is only so-so, and writability is in the crapper. It's still without question an ALGOL/Pascal-derived language (C is a BCPL-derived, lexically), and one that has some continuing practical value.

Re: Haskell, the point of monads is precisely to keep the core of the language pure. Anything that 'changes the world', i.e. IO and the like is kept seperate from the core algorithm/program. It took a while for me to grok, but it sure makes for easy to maintain programs, albeit after a while. My first functional programs proved that you can do 'spaghetti' in any language.:D

I do quite a bit of Ada, though, and you're right about the writeability. However, maintenance after the fact is a breeze.

I never could get to love Java. I tried, and though I do use parts of it (Tomcat et al), it's not a language I really like. Different strokes and all that...
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
Let's wrap up the argument. I'll just say perhaps my opinion of Java is based with it being the favorite of students who will never graduate.

Anyway, I've used Scheme but never Haskell. I chuckled at the comment about LISP being unreadable. But that's half the fun. So how does Scheme compare to Haskell? I could look that up, but it generates less discussion. :)

Anybody use brain**** or false? Fun stuff.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.