The Artima Developer Community
Sponsored Link

C++ Community News Forum
The Problem with Programming

212 replies on 15 pages. Most recent reply: Dec 8, 2006 6:12 AM by James Watson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 212 replies on 15 pages [ « | 1 2 3 4 5 6 7 8 ... 15  | » ]
Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 9:16 AM
Reply to this message Reply
Advertisement
> In the light of
> recent push back to functional programming roots it is
> clear that Java architects have failed in that realm. Neal
> Gafter's blog at
> http://gafter.blogspot.com/2006/11/reified-generics-for-ja
> va.html
> shows where Java architects have gone wrong with respect
> t to generic programming.

Define "gone wrong".

If you mean they failed to fulfill some golden rule of purity with regards to what an ultimate Generics solution should be, then maybe, but then again, point me to a design and implementation of a templating mechanism that everybody agrees on...

I have my qualms with Java Generics, but I have to give Neal and others a big nod: they managed to retrofit a critical feature in a language used by millions around the world without breaking anything.

As any C++ programmer (and Stroustrup foremost) will attest, developing a language with backward compatibility in mind is an impossible task, and with that in mind, I think that both C++ and Java did a decent job solving this problem with their own particular constraints.

> In that sense, the
> interview strikes right at the heart of the problem -
> nowadays anyone can write and sell software. That must
> change, no matter what language is used.

That's a frighteningly elitist statement, but if you really believe that programming should remain the exclusive privilege of a minuscule group of selected people, then C++ is definitely the right choice for you :-)

--
Cedric

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 9:33 AM
Reply to this message Reply
>> [a long list...]

Cameron, some of these things that you have mentioned seem to be addressed in Scala. Have you looked at it? Do you think that it is on the right track? I think it could be. I didn't see any mention of generics and static vs. dynamic typing. Do you think static typing is worth the cost?

>> The problem isn't skills, it's attitude. People get old and
>> [mentally] brittle just as code does, and we get stuck in
>> our old ways. I assume that I am no more immune to that
>> than other people, such as obviously-smart people like BS.

I don't think BS is afraid of change. I think he is unable to admit that his baby is flawed and wants to blame developers for it's faults.

I love analogies so suppose I walked through a plate glass door in a bar (I know someone who actually did this) and the glass was not tempered, resulting in my being cut very badly (possibly dying). I bear some responsibility for my carelessness, yes, but it is also true that the bar's owner is guilty of negligence. This is how I see C++. When a developer stumbles into a pitfall, he or she is blamed, but I believe that pitfall should never have been there in the first place.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 9:34 AM
Reply to this message Reply
> That's a possible interpretation. Here is mine: J2EE is
> complex because it solves complex problems.

I really know nothing about J2EE, but my take on this is that a lot of Java code complexity stems from single object hierarchy and everything is object approach.

> I have surveyed and even worked on "J2EE-like" solutions
> written in C++, and trust me, it was not pretty.
>
> Why? Because C++ doesn't have standard libraries for
> "modern programming" (multithreading, remotability,
> security, servlets, introspection, dynamic loading,
> etc...), so you end up reusing non-standard ones or
> rolling your own. Add this to the intrinsic complexity of
> the language, its non-portability and still very-buggy
> compilers, and you'll quickly find out why Java is more
> productive.

This is a valid point. C++ is not owned by any corporation and an international standard, so introducing new features and libraries is a long and complex process.
As far as compilers, things are definitely getting much, much better in the recent years. Parsing a monster like C++ is not an easy job.
Also, there are serious and high quality C++ frameworks available comparable with the richness of Java standard library.
Here are a few links:

http://www.cs.wustl.edu/~schmidt/ACE.html
http://www.boost.org/
http://appinf.com/poco/info/index.html

If you internally standardize on one of such libraries, you're in pretty good shape.

> It depends what kind of performance you need. If Java is
> good enough for the likes of Google, Yahoo and eBay,
> surely it's good enough for a lot of people...

For most things definitely. But when the rubber meets the road and you have to do a critical piece of code, guess what you use. As an example, take Google's map reduce:

http://en.wikipedia.org/wiki/MapReduce

> How so? Both languages are equally strongly typed.

What about type erasure in Java?
I'm no Java pundit by any stretch of imagination, but it seems to me that they've got themselves in hot water with generics - they are much needed, but nobody seems to be pleased with it.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 9:46 AM
Reply to this message Reply
> I have my qualms with Java Generics, but I have to give
> Neal and others a big nod: they managed to retrofit a
> critical feature in a language used by millions around the
> world without breaking anything.

Maybe Gosling would have known better had he paid attention to this 1995 article:

http://www.byte.com/art/9510/sec12/art3.htm

> That's a frighteningly elitist statement

It's about as frightening and elitist as requiring the engineer who designs a bridge or my dentist to go to school beforehand and be certified to do what they do for living.

Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 10:00 AM
Reply to this message Reply
> I really know nothing about J2EE, but my take on this is
> that a lot of Java code complexity stems from single
> object hierarchy and everything is object approach.

No, this is a red herring (besides, not everything is an Object in Java, which some people like and other people hate. Damned if you do, damned if you don't).

The reality of today's programming is that we are way past the language barrier. It doesn't really matter any more if you support multiple inheritance of operator overloading (which solve micro-problems), but it does matter a great deal if your development environment lets you load classes and introspect them on the fly, if you can easily write dynamic web pages that comply to respected design patterns such as MVC, if you can easily marshal objects between processes or machines, if you can implement and debug multi-thread code with powerful IDE's, if those IDE's support easy browsing, code completion, refactoring, source control and other advanced concepts, etc...

Fifteen years, I understood Bjarne's decision to not include a hashtable to the STL because it was hard to specify and we wanted to hit the deadline, but now...?

C++ is still stuck in the old language wars and has never moved to the next level: standardized frameworks.

> > I have surveyed and even worked on "J2EE-like" solutions
> > written in C++, and trust me, it was not pretty.
> >
> > Why? Because C++ doesn't have standard libraries for
> > "modern programming" (multithreading, remotability,
> > security, servlets, introspection, dynamic loading,
> > etc...), so you end up reusing non-standard ones or
> > rolling your own. Add this to the intrinsic complexity of
> > the language, its non-portability and still very-buggy
> > compilers, and you'll quickly find out why Java is more
> > productive.
>
> This is a valid point. C++ is not owned by any corporation
> and an international standard, so introducing new features
> and libraries is a long and complex process.
> As far as compilers, things are definitely getting much,
> much better in the recent years. Parsing a monster like
> C++ is not an easy job.

It's not just about parsing, it's also about user-friendliness, with problems such as issuing huge template error messages that don't even reuse your typedefs. We used to have this problem 10 years ago when I was breathing C++ ten hours a day, and I just can't believe it hasn't been solved now. And that's just one example.

> Also, there are serious and high quality C++ frameworks
> available comparable with the richness of Java standard
> library.
> Here are a few links:

No doubt, but you are missing my original point: these are not "standard". They are not shipped with C++ (and if they were, they would probably differ in implementation anyway). This results in a heavy knowledge fragmentation with every C++ programmer being an expert on a different domain or framework.

> For most things definitely. But when the rubber meets the
> road and you have to do a critical piece of code, guess
> what you use. As an example, take Google's map reduce:
>
> http://en.wikipedia.org/wiki/MapReduce

Most people use Java to access MapReduce :-)

> > How so? Both languages are equally strongly typed.
>
> What about type erasure in Java?

It only matters at the bytecode level. Source-wise, C++ and Java have comparable levels of type safety.

> I'm no Java pundit by any stretch of imagination, but it
> seems to me that they've got themselves in hot water with
> generics - they are much needed, but nobody seems to be
> pleased with it.

I think you are misreading the community. We all have our personal complaints, but overall, Generics have been widely accepted. Which is not surprising, because the feature was designed and voted in by that community.

--
Cedric
http://beust.com/weblog

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 10:03 AM
Reply to this message Reply
> > How so? Both languages are equally strongly typed.
>
> What about type erasure in Java?
> I'm no Java pundit by any stretch of imagination, but it
> seems to me that they've got themselves in hot water with
> generics - they are much needed, but nobody seems to be
> pleased with it.

Type erasure doesn't eliminate strong typing. Code that compiles without warnings is typesafe and the type conversions are always checked at runtime.

Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 10:04 AM
Reply to this message Reply
> > That's a frighteningly elitist statement
>
> It's about as frightening and elitist as requiring the
> engineer who designs a bridge or my dentist to go to
> school beforehand and be certified to do what they do for
> living.

Obviously, only the best people are chosen for such critical works, why would it be different for the software industry?

The more people can write software, the better software will be. Sure, the distribution of talent will follow a standard distribution, such as 5% superstars, 5% incompetent and everyone somewhere in-between. But guess what: when the population of these samples increase, the number of superstars raises as well.

--
Cedric
http://beust.com/weblog

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: The Problem with Programming Posted: Nov 29, 2006 10:25 AM
Reply to this message Reply
> I think you are misreading the community. We all have our
> personal complaints

I guess it is true for any community of intellectual people. To me, it is interesting how an interview with B. Stroustrup has turned out into an avalanche of anti-C++ and pro-Java postings. To me, Stroustrup comes across as a no-nonsense guy. Longevity and the widespread use of the language he designed speaks for itself. Whoever disagrees is perfectly entitled to their opinion.

Alex Stojan

Posts: 95
Nickname: alexstojan
Registered: Jun, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 10:39 AM
Reply to this message Reply
> In that sense, the
> interview strikes right at the heart of the problem -
> nowadays anyone can write and sell software. That must
> change, no matter what language is used.

This is a very good point! I've never heard of medical tools for non-doctors so they can work as doctors, or engineering tools for non-engineers so they can work as engineers, but in software industry you have lots of programming tools (languages) for non-programmers (VB 6 for example). Java, for example, was originally marketed as a language for non-programmers!

Paul M. Dubuc

Posts: 19
Nickname: pmd
Registered: Oct, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 10:46 AM
Reply to this message Reply
> Since we are at it. Has anyone an explanation for the
> growth of interest in VB? After all there seems to be a
> silent majority that seems not to affected by the
> discussions of frustrated, mostly idealist programmers.

It was back in 2002 that I once heard Bruce Eckel say that Java was the next VB. I heard it with my own ears.

Cameron Purdy

Posts: 186
Nickname: cpurdy
Registered: Dec, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 10:47 AM
Reply to this message Reply
> To me, it is interesting how an interview with B.
> Stroustrup has turned out into an avalanche of anti-C++
> and pro-Java postings. To me, Stroustrup comes across as a
> no-nonsense guy.

For those of us who have used both C++ and Java extensively (I think Cedric was on the C++ standards committee for example), BS comes across as anything but no-nonsense. He is emotionally coupled to C++ and refuses to think objectively about the advances that have occurred outside of C++.

Regarding the other comments on the thread, they are hardly anti-C++. Those of us that used it appreciate C++ for what it is, and those of us that have moved to newer and arguably improved languages understand C++ for what it isn't.

Peace,

Cameron Purdy
http://www.tangosol.com/

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:00 AM
Reply to this message Reply
> Java, for example, was originally marketed
> as a language for non-programmers!

Can you provide a reference? Java was originally created for developing embedded systems. That's not really the normal domain for non-programmers.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:01 AM
Reply to this message Reply
> > Since we are at it. Has anyone an explanation for the
> > growth of interest in VB? After all there seems to be a
> > silent majority that seems not to affected by the
> > discussions of frustrated, mostly idealist programmers.
>
> It was back in 2002 that I once heard Bruce Eckel say that
> Java was the next VB. I heard it with my own ears.

Well Bruce was way off on that one. Everyone knows now that Java is the new COBOL.

Alex Stojan

Posts: 95
Nickname: alexstojan
Registered: Jun, 2005

Re: The Problem with Programming Posted: Nov 29, 2006 11:06 AM
Reply to this message Reply
> > Java, for example, was originally marketed
> > as a language for non-programmers!
>
> Can you provide a reference? Java was originally created
> for developing embedded systems. That's not really the
> normal domain for non-programmers.

I read this in an article, but I don't remember which one. It didn't refer to the original design of Java, but to its subsequent use as a Web development language and a language that will replace C++. That was around '96, '97.

Paul M. Dubuc

Posts: 19
Nickname: pmd
Registered: Oct, 2004

Re: The Problem with Programming Posted: Nov 29, 2006 11:08 AM
Reply to this message Reply
> It depends what kind of performance you need. If Java is
> good enough for the likes of Google, Yahoo and eBay,
> surely it's good enough for a lot of people...

How much Java does Google use? What do they use it for? Chris DiBona, who heads up Google's open source development and software technology acquisition (if I remember right) said recently at a conference which I attened that Google uses very little Java. All its application servers are written in C++. (They use a lot of Python for scripting.) They take very seriously that elapsed time number that they post on their search results. Amazon.com also relies very heavily on C++. I don't have a good feel for how much C++ Yahoo uses, but a neighbor of mine who has worked for them for several years did all his programming in C++.

Flat View: This topic has 212 replies on 15 pages [ « | 1  2  3  4  5  6  7  8 | » ]
Topic: Pantheios 1.0.1 full release approaching; beta 17 just released Previous Topic   Next Topic Topic: John Ousterhout on What Limits Software Growth

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use