The Artima Developer Community
Sponsored Link

Java Community News
Should We Strive to Only Have One Language in Our Development Efforts?

60 replies on 5 pages. Most recent reply: Aug 30, 2007 8:18 AM by nes

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 60 replies on 5 pages [ « | 1 2 3 4 5 | » ]
Nemanja Trifunovic

Posts: 172
Nickname: ntrif
Registered: Jun, 2004

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 5:54 AM
Reply to this message Reply
Advertisement
>
> No, C++ did not have garbage collection, nor does it
> today.
>

Not as a built-in feature, but as an external library yes. For instance, Boehm's GC library has been around for a while and there are even people who use it, although I still wonder why would anyone need such a thing :)

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 8:17 AM
Reply to this message Reply
> Borland made quite a few pennies off of C++.

ANSI/ISO C++ has never had any big marketing machine promoting it. Borland, Microsoft & co have always been trying to push non-standard extensions to the language with a clear intention to lock users into their proprietary products.

> It's pretty arrogant to say that people are leaving C++
> only because of hype.

I did not say hype is the 'only' reason. People do that for various reasons of which one of the main ones is falling prey to the marketing hype about 'silver bullet' or 'language du jour'. My comment was in the context of garbage collection where Java GC has been presented by marketing as a silver bullet, which it is not.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 8:20 AM
Reply to this message Reply
> >
> > No, C++ did not have garbage collection, nor does it
> > today.

> Not as a built-in feature, but as an external library yes.
> For instance, Boehm's GC library has been around for a
> while and there are even people who use it, although I
> still wonder why would anyone need such a thing :)

I didn't bother to answer this one, since folks with that attitude probably do not consider that count as garbage collection. There is this attitude that only Java-like GC (which is written in C++ if I'm not mistaken) is true garbage collection.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 10:00 AM
Reply to this message Reply
> > Borland made quite a few pennies off of C++.
>
> ANSI/ISO C++ has never had any big marketing machine
> promoting it. Borland, Microsoft & co have always been
> trying to push non-standard extensions to the language
> with a clear intention to lock users into their
> proprietary products.

Not all hype comes from marketing machines. The book Extraordinary Popular Delusions and the Madness of Crowds describes many such cases in fine detail. For example, the Dutch tulip craze was not driven by any marketing machine. There is a lot misguided hype that has been born from the masses. I don't consider hype to defined by it's source. Bad advice is bad advice whether it comes from one big company or thousands of individuals.

> > It's pretty arrogant to say that people are leaving C++
> > only because of hype.
>
> I did not say hype is the 'only' reason. People do that
> for various reasons of which one of the main ones is
> falling prey to the marketing hype about 'silver bullet'
> or 'language du jour'. My comment was in the context of
> garbage collection where Java GC has been presented by
> marketing as a silver bullet, which it is not.

I can show you a lot of examples of individuals (not marketing people) who believe that the lack of 'free' in Java is the most important reason to move from C++ to Java. You may disagree with them but to just say that this belief is derived solely from marketing is presumptive and, I believe, wrong.

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 10:15 AM
Reply to this message Reply
> > >
> > > No, C++ did not have garbage collection, nor does it
> > > today.
>
> > Not as a built-in feature, but as an external library
> yes.
> > For instance, Boehm's GC library has been around for a
> > while and there are even people who use it, although I
> > still wonder why would anyone need such a thing :)
>
> I didn't bother to answer this one, since folks with that
> attitude probably do not consider that count as garbage
> collection. There is this attitude that only Java-like GC
> (which is written in C++ if I'm not mistaken) is true
> garbage collection.

For me it is perfectly acceptable, and I keep a copy of it in my hard disk compiled for my own purposes. I have also done a little benchmark for it:

http://news.gmane.org/find-root.php?message_id=%3cf0qtki%241mj%241%40sea.gmane.org%3e

The most impressive thing is how slow Microsoft's malloc is when compared to dlmalloc.

Cameron Purdy

Posts: 186
Nickname: cpurdy
Registered: Dec, 2004

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 2, 2007 1:50 PM
Reply to this message Reply
> There is this attitude that only Java-like GC
> (which is written in C++ if I'm not mistaken) is true
> garbage collection.

Garbage collection has been around for at least three decades, and OO GC for at least two decades, and Java has only been around for one decade, so if I were you, I wouldn't waste so many neurons worrying about what some Java bigot says. Apparently (since I haven't met anyone like what you describe), such bigots are attracted to C++ coders ;-)

Peace,

Cameron Purdy | Oracle
http://www.oracle.com/technology/products/coherence/index.html

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 4:38 AM
Reply to this message Reply
> defined by it's source. Bad advice is bad advice whether
> it comes from one big company or thousands of
> individuals.

Yes, I can agree with that. However I have yet to see a good explanation of why is C++ such a bad language that we should all run away from it. To me, the arguments in favor of it (as presented by the language author and a small group of experts, not some hot-headed zealot) just make a lot of sense.

> I can show you a lot of examples of individuals (not
> marketing people) who believe that the lack of 'free' in
> Java is the most important reason to move from C++ to
> Java.

In this particular case, it has to be because they don't know enough about C++. Otherwise, they'd know about new/delete.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 5:02 AM
Reply to this message Reply
> Apparently (since I haven't met anyone
> like what you describe), such bigots are attracted to C++
> coders ;-)

Buy a mirror ;-). Or, maybe you would be willing to elaborate on your claim that "C++ did not have garbage collection, nor does it today." and prove to the rest of us that it is not a derogatory statement.

Nemanja Trifunovic

Posts: 172
Nickname: ntrif
Registered: Jun, 2004

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 6:10 AM
Reply to this message Reply
> However I have yet to see a
> good explanation of why is C++ such a bad language that we
> should all run away from it.

That's not even the point. C++ is currently the only mainstream language that offers both very low level access to the system (including embedded assembly) and abstraction mechanisms that help with large-scale development. Languages like C and Forth offer the former, but not the later, and various high-level languages offer the later but not the former.

Some people and organizations prefer to use separate languages for each purpose (yey, we are back on the topic!), but interoperation between different languages and platforms can be very tricky.

Peter Booth

Posts: 62
Nickname: alohashirt
Registered: Aug, 2004

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 6:22 AM
Reply to this message Reply
> > Three other reasons to have multiple languages:
> >
> > 2) J2EE (=Java + XML) is a good example of crappy use
> of
> > two languages
> >
> > For me the bottom line is that if we use two or more
> > languages each should contribute something distinctive
> to
> > the mix.
>
> Are you suggesting that Java and XML do not offer anything
> distinct or something else?

James,

I have this unfortunate habit of writing with the assumption that others can read my mind ..

I think that Java is a superb language that has changed the programming landscape immensely for the better. It is probably the most influential language to date, and I am very grateful to Sun for giving us Java. Today Java is the obvious choice for most infrastructure and high performance programming, and is a fine, if expensive choice for general application development. I hope that as it's successor emerges (Ruby, Scala?) that Java doesn't repeat the path of Fortran 90 where new language features were grafted on.

I think that the sweet spot for XML is much narrower. I think it is a great choice for architecture independent APIs exposed to the world (e.g. google maps, Amazon API, etc). Unfortunately someone had the idea that if a little XML is good, a lot must be better, so we see XML being used in places where it adds complexity, opacity, and degrades performance with no value add. An example of this would eb the rush to use XML as configuration property file format for J2EE and other components. A property file, or a nested property file, would be simpler and more readable but is less "buzzword-compliant". Whenever technical decisions get made because of their fashionableness rather than their suitability people end up in tears. Developers spend years building mental models of imperative and object oriented programming languages. Moving complexity out of these and pushing it into XML configuration is rarely a win, and leads to bloated, poorly understood, over complex applications.

I think J2EE is a great example of combining two languages (Java and XML) where the result is less than the sum of the parts. I like to wonder what would have happened if either YAML or JSON were viable choices and had been selected instead of XML? A lot of what I see in J2EE is what I call complectification - the desire that some smart people have to wallow in complexity to the detriment of their users and development team.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 6:32 AM
Reply to this message Reply
> > defined by it's source. Bad advice is bad advice
> whether
> > it comes from one big company or thousands of
> > individuals.
>
> Yes, I can agree with that. However I have yet to see a
> good explanation of why is C++ such a bad language that we
> should all run away from it. To me, the arguments in favor
> of it (as presented by the language author and a small
> group of experts, not some hot-headed zealot) just make a
> lot of sense.

I guess my perspective is that a lot of projects that used C++ never should have in the first place. I don't think the burden of complexity is out-weighed by the benefits.

Also, calling anyone who doesn't believe in the absolute superiority of C++ names makes your claims of bigotry hard to swallow.

> > I can show you a lot of examples of individuals (not
> > marketing people) who believe that the lack of 'free'
> in
> > Java is the most important reason to move from C++ to
> > Java.
>
> In this particular case, it has to be because they don't
> know enough about C++. Otherwise, they'd know about
> new/delete.

That doesn't make sense to me as a response to my point but you can read a couple example yourself. Neither are Java bigots. They actually slam Java as much as they praise it. The comment about free() is in the second one.

http://steve.yegge.googlepages.com/tour-de-babel

http://www.jwz.org/doc/java.html

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 6:49 AM
Reply to this message Reply
> > > Three other reasons to have multiple languages:
> > >
> > > 2) J2EE (=Java + XML) is a good example of crappy use
> > of
> > > two languages
> > >
> > > For me the bottom line is that if we use two or more
> > > languages each should contribute something
> distinctive
> > to
> > > the mix.
> >
> > Are you suggesting that Java and XML do not offer
> anything
> > distinct or something else?
>
> James,
>
> I have this unfortunate habit of writing with the
> assumption that others can read my mind ..

No problem. I do it all the time. I'm just overjoyed to not be 'yelled' at for asking for clarification.

> I think that Java is a superb language that has changed
> the programming landscape immensely for the better. It is
> probably the most influential language to date, and I am
> very grateful to Sun for giving us Java. Today Java is the
> obvious choice for most infrastructure and high
> performance programming, and is a fine, if expensive
> choice for general application development. I hope that as
> it's successor emerges (Ruby, Scala?) that Java doesn't
> repeat the path of Fortran 90 where new language features
> were grafted on.

[psst, that's already happened and I think it's going to get worse]

> I think that the sweet spot for XML is much narrower. I
> think it is a great choice for architecture independent
> APIs exposed to the world (e.g. google maps, Amazon API,
> etc). Unfortunately someone had the idea that if a little
> XML is good, a lot must be better, so we see XML being
> used in places where it adds complexity, opacity, and
> degrades performance with no value add. An example of this
> would eb the rush to use XML as configuration property
> file format for J2EE and other components. A property
> file, or a nested property file, would be simpler and more
> readable but is less "buzzword-compliant".

Get out of my head, you!

> Whenever technical decisions get made because of their
> fashionableness rather than their suitability people end
> up in tears. Developers spend years building mental models
> of imperative and object oriented programming languages.
> Moving complexity out of these and pushing it into XML
> configuration is rarely a win, and leads to bloated,
> poorly understood, over complex applications.

I wish there was a solution for this. People tend to get so tied to one way of doing things. In a way, working with Java for so long kind of shocked me out of that. So much of what we were told to do in Java is now considered bad practice.

> I think J2EE is a great example of combining two languages
> (Java and XML) where the result is less than the sum of
> the parts. I like to wonder what would have happened if
> either YAML or JSON were viable choices and had been
> selected instead of XML? A lot of what I see in J2EE is
> what I call complectification - the desire that some smart
> people have to wallow in complexity to the detriment of
> their users and development team.

Part of the problem is that Java lacks any feature that would make it a good language for writing parsers. Personally, I think SAX is the best thing going in Java for XML but you almost have to think like a functional programmer to make it work. Most Java programmers don't even know what functional programming is, in my experience.

In any event, to make the Java and XML combination work, I think you need to add the XPath family of languages.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 7:13 AM
Reply to this message Reply
> Also, calling anyone who doesn't believe in the absolute
> superiority of C++ names makes your claims of bigotry hard
> to swallow.

I have never said anything of sorts.

> http://steve.yegge.googlepages.com/tour-de-babel

Quote from the article: "C++ is dumb, and you can't write smart systems in a dumb language."
The statement says way more about the author then about C++.

> The comment about free() is in the second one.
> http://www.jwz.org/doc/java.html

This link is broken. So, I guess, we can't learn how free() makes C++ bad.

Alex Fabijanic

Posts: 71
Nickname: aleksf
Registered: Aug, 2006

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 7:24 AM
Reply to this message Reply
> That's not even the point. C++ is currently the only
> mainstream language that offers both very low level access
> to the system (including embedded assembly) and
> abstraction mechanisms that help with large-scale
> development. Languages like C and Forth offer the former,
> but not the later, and various high-level languages offer
> the later but not the former.
>
> Some people and organizations prefer to use separate
> languages for each purpose (yey, we are back on the
> topic!), but interoperation between different languages
> and platforms can be very tricky.

Very well put. These are the core issues.

As I mentioned initially, in some scenarios (web client, scripting ...), the only reasonable solution is a specialized language.
In some areas (e.g. multithreading) the functional languages are showing superiority. However, still unanswered question is why the functional languages, being around for so long, did not get more traction.

In no case is any language a silver bullet. So, to get back to the original topic:
No, we should not strive to have only one language. We need and should use multiple languages whenever there is a good and solid reason for it.

Cameron Purdy

Posts: 186
Nickname: cpurdy
Registered: Dec, 2004

Re: Should We Strive to Only Have One Language in Our Development Efforts? Posted: Aug 3, 2007 7:58 AM
Reply to this message Reply
> > Apparently (since I haven't met anyone
> > like what you describe), such bigots are attracted to C++
> > coders ;-)

> Buy a mirror ;-). Or, maybe you would be willing to
> elaborate on your claim that "C++ did not have garbage
> collection, nor does it today." and prove to the rest of
> us that it is not a derogatory statement.

But C++ does not have garbage collection, so my statement is correct and to the point. As someone else in this thread pointed out, there is work going on right now to add garbage collection to C++, and that work is expected to complete in two years, which means that incompatible implementations may start to appear within two years and compatible implementations may start to appears a few years after that. Having lived through many of the "feature adding" iterations of C++, I have a fair understanding of how these things work. In fact, we're still suffering today from things that were supposedly standardized almost a decade ago.

At any rate, I have to guess that you are referring to the ability (on certain platforms and with certain C++ compilers) to add third-party garbage collection. Having worked with some of the pioneers of GC technology in C++, I can say that the capability is impressive technically, and coincidentally it was used by Sun to do the GC in the original Sun JIT compiler. Nonetheless, C++ itself does not have garbage collection and that is simply a statement of fact, and not a derogatory statement.

Referring to your "buy a mirror" comment, I have written more than enough C++ code to have an opinion on the subject, and I'm still managing C++ (and Java and C#) development today. I have several engineers who work fluently in both Java and C++, and they switch back and forth fairly constantly, and their well informed opinions and demonstrable experience clearly highlight the challenges that C++ provides that simply are not present in Java, while having very little of additional value to offer in return.

This does not make me a bigot. C++ was my #1 choice until Java came along, and Java would not have been so great a success if it were not for the things it learned from C++. Similarly something will replace Java, and I will hardly be a bigot if I adopt that new thing.

Peace,

Cameron Purdy | Oracle
http://www.oracle.com/technology/products/coherence/index.html

Flat View: This topic has 60 replies on 5 pages [ « | 1  2  3  4  5 | » ]
Topic: Spring Web Flow 2.0 Milestone 1 Released Previous Topic   Next Topic Topic: Alberto Savoia on Testing the Untestable

Sponsored Links



Google
  Web Artima.com   

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