Gosling and general purpose languages

Gosling and general purpose languages

Summary: Gosling makes a good point regarding the importance of general purpose programming languages, but Dana Gardner also makes a good point as to why Java is losing out to LAMP technologies.

SHARE:

James Gosling learned a lesson in a recent blog post on the subject of scripting vs. strongly typed general purpose languages, and that is that readers of technology news are evil. Yes, I mean you. You guys make that scene where Steve Martin goes off on John Candy in Planes, Trains and Automobiles look like a scolding at a kindergarten. Hey, I expect it with me. I work for the Devil. But, people were telling James Gosling, inventor of the Java programming language and generally acknowledged smart guy, that he had to do more research on programming languages before he opened his mouth. Is nothing sacred?

I have to agree with Gosling's point. You've heard the analogy that if you have a hammer, everything looks like a nail. Well, too often, people who are expert in a scripting language think that it's a good idea to do EVERYTHING with it. A work colleague of mine from way back when was a huge fan of Perl, and he proceeded to make an entire web site, including business logic, in the scripting language. It was an impressive feat, and to this day, I have never seen quite so much Perl in one place. Unfortunately, the code was also a slow-performing, impossible-to-maintain hairball. Suffice to say, the client was not happy with him.

I'm an object fanatic, and I really think it's better to do as much as possible in a more strongly-typed, general purpose language like Java. Scripting code has it's place, just as the tape on a Christmas present has it's place. Tape holds everything together, just as scripting languages, properly used, are the glue that holds together business logic written in more rigorously typed languages. When you start to wrap your presents entirely in tape, though, you know you've gone off the Christmas deep end.

Since I find native code development to be reminiscent of "Member's Only" Jackets and 80s hair bands, I'm also a fan of "virtual machine" or "managed" environments. They lead to safer, less buggy code due to the addition of runtime services that prevent common problems by managing memory, checking buffer lengths automatically, and providing better error handling, just to name a small fraction of the things VM/Managed environments provide. That's why I consider it essential for modern backend code - and even hairy bits of client code - to be written in either Java or .NET.

That being said, I also agree with Dana Gardner's post yesterday about what was not said in a follow-up interview to Gosling's blog post, which is an elucidation of a previous point I made last December.  Java's growth is slowing because a new ecosystem is developing around open source tools, and due to the proprietary nature of Java, Java has missed that boat. Of course, what Dana doesn't talk about is why profit-oriented companies should give away intellectual property, particularly when other areas of its business are hitting the shallows, but that's a question that applies to the open source development model in general.

Still, I don't think Dana proposes a viable alternative to the strongly-typed, general purpose language. Frankly, you don't want to do everything in a scripting language. If that piece of the puzzle isn't filled by Java in the Unix-inspired open source ecosystem, then what does? C++? I sure hope not.

Topic: Software Development

John Carroll

About John Carroll

John Carroll has delivered his opinion on ZDNet since the last millennium. Since May 2008, he is no longer a Microsoft employee. He is currently working at a unified messaging-related startup.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

57 comments
Log in or register to join the discussion
  • Hate to agree with you

    but I do. The Perl hacks of old have been replaced with the Python hacks of new.

    As founding member of PAPPL (People Against the Proliferation of Programming Languages), I am just flabbergasted when someone with a Thesaurus "develops" a new "language". In terms of scripting, I can do everything I need to do in ksh. Perl is more flexible and its multi-platform ability make it more attractive than ksh. But now you add Python - just what can you do in Python that you can't do in Perl (rhetorical!). Us "old timers" would be happy to just "stick" with one useful scripting language instead of "the popular one at present".

    Most open source programs are written in "C" I've noticed. That's probably since "most" OSS programers are older and that's what they're used to (big guess here). But it proves that "C" is "good enough" to do the "heavy lifting" of most OSS projects.

    I like Java - the whole concept makes a lot of sense. .NET is a Thesaurus (more like global search and replace) rip-off of Java WITHOUT the cross-platform advantages, so I don't like that. There is NO DOUBT that M$ has some of the best development tools around, and they could make dog crap look like golden eggs - so your response about .NET being "so great" is understandable.
    Roger Ramjet
    • Regarding .NET

      1) I've used both Java and .NET extensively. .NET is hardly a Thesaurus-based, search and relace rip-off of Java. Does it build on concepts found in Java? Most assuredly, just as JSP built on concepts found in ASP.

      2) .NET the core is standardized and can be implemented by anybody. .NET the high-level Microsoft development library is cross-platform if you use Mono.

      Hate it when people make gross simplifications in order to make a point. Feel free to dislike .NET, but don't dislike it for the wrong reasons.
      John Carroll
      • Something stinks

        First you rail about Java being proprietary because one definition (Mr. Stallman's) categorizing almost everything as proprietary. (Heck, he's even down on Linux, errrr GNU/Linux, if you haven't HURD.)

        .NET the core is NOT standardized. CLR and C# are ECMA standards. .NET the high-level libraries are currently re-implemented (to less than 100% compatibility) in an un-licensed manner by Mono. If you in fact choose to use Mono then you're potentially wide open to a nasty little IP lawsuit in the future and left waiting as they play catch-up with each version rev of .NET.

        If you hate gross simplifications so much then don't make them.
        Robert Crocker
        • Define core

          [i].NET the core is NOT standardized. CLR and C# are ECMA standards. .NET the high-level libraries are currently re-implemented (to less than 100% compatibility) in an un-licensed manner by Mono.[/i]

          How is that different than what I said. I said the CORE, which is everything you need to build libraries on top of the CORE .NET runtime. I distinguished that from the Microsoft .NET Framework.

          As for whether Microsoft can sue anyone for cloning an API, open question. By that standard, if I made a web service that matched the characteristics of someone else, could I be sued?

          IP lawsuits are a risk whether you copy Microsoft's APIs or use open source, quite frankly. Microsoft DOES have a certain amount of limitation on movement, though. If Microsoft tried to shut down Mono, what ramifications would that have for the DOJ?

          But I'm not pretending the .NET Framework (as opposed to the core) is more open than Java.
          John Carroll
          • I would think CORE was more extensive...

            than simply the information about the Runtime and one language spec. What can you build with MS's BSD version of the CLR?

            Microsoft has publicly claimed that they have patents covering portions of .NET. This would provide IP coverage greater than just the API.

            If MS tried to shutdown Mono right now and they used a legally enforceable patent then I can't see any ramifications with the DoJ.
            Robert Crocker
  • Do you understand Proprietary?!?

    I'm curious as to how you say that Java is proprietary. The specification is freely available and anyone can implement it in whatever form they like. The ONLY catch is that if you want to call it Java you need to either have an OSS license and pass a certification test or you can buy a commercial license and pass the test in order to use the Trademark.

    Please do enlighten us on your definition of proprietary.
    Robert Crocker
    • Yes, the old debate

      It is proprietary according to the Richard Stallman and the free software vigilantes, hence the desire to make a completely unencumbered version of Java through it's CLASSPATH initiative.

      So, I'm playing my get out of jail free card, and telling you to go debate that with the people who are convinced it is too proprietary for consideration.
      John Carroll
      • Class vs. Instance

        [i]It is proprietary according to the Richard Stallman and the free software vigilantes, hence the desire to make a completely unencumbered version of Java through it's CLASSPATH initiative.[/i]

        I hope you're more careful with your programming than with your English. In the above you're confusing the class [1] and the instance [2].

        It's patently possible to have a proprietary instance of a non-proprietary class; Microsoft's recent announcement of a Python version demonstrates this.

        Stallman's objection is to the so-called "Java Trap," where otherwise [i]libre[/i] software is constrained by dependence on a non-[i]libre[/i] product such as Java. This trap only exists when there are no [i]libre[/i] alternatives.

        Substitute what you will for [u][i]libre[/i][/u] above, BTW: Microsoft customers ran into this problem a while back with a facility in a Microsoft tool which Microsoft had a license for but had not paid to cover its customers, who found that they were infinging a patent just by using a Microsoft tool.

        It's a fundamental issue with inherited non-transitive properties.

        [1] Java
        [2] Sun's implementation of Java
        Yagotta B. Kidding
        • A useless distinction

          A class definition is rarely something somebody can own. I can clone the API of something to my heart's content. What I can't do is take the source code of a proprietary product (however I got it) and make it my own. WINE is cloning the API and making a new implementation, and there really isn't very much Microsoft can do about it (well, barring patents), so I think your distinction is meaningless. Open source is always about making an open source IMPLEMENTATION.

          But, they also want standard API / class specifications that lots of people can have input into, and that's also a point of contention in Java. Though the community does have input, the final word on what is or isn't Java is Sun. Granted, you can make any custom libraries you want, even cloning libraries from third parties. What you can't do is call the result core Java. That's the other side of the issue.

          Both these points are what cause open source folks to lose sleep, and why most people (besides in the Talkbacks) don't consider Java sufficiently open for use in a pure open source stack.

          [url=http://www.eweek.com/article2/0,1895,1706960,00.asp]This eWeek article[/url] talks about the issue.
          John Carroll
      • Mind the P's and Q's

        There are actually two seperate movements which are contained in what is genrally considered the FLOSS (Free Libre Open Source Software) movement.

        The Free Software Movement and the Open Source Movement. Although both movements share common intrests in many respects there are core philosphical differences in the movements. Well actually there are three now if you consider the CC (Creative Commons) movement in with them, as many do- some software has been released under a CC license, mostly games, although CC is mostly used for content.

        Java and OpenSolaris licensing satisfy some in the Open Source movement where as almost nobody in the Free Software movement are not satisfied. Also note that GNU and the GPL are not the only orginizations and license particpating in the Free Software movement- IBM's CPL, which your employer Microsoft has even released some software under, is a Free Software license which is incompatible with the GPL.
        Edward Meyers
  • It's about the tools.

    As you wrote:
    Java's growth is slowing because a new ecosystem is developing around open source tools, and due to the proprietary nature of Java, Java has missed that boat.

    Yes, the anti-proprietary purists have avoided Java because it helps assure a company survives and its employees get paid.

    Worth noting that improved Java tools are on their way.

    As Roger wrote and I think you'd agree, excising the pejorative language:

    There is NO DOUBT that M$ has some of the best development tools around, and they could make dog crap look like golden eggs - so your response about .NET being "so great" is understandable.


    Programming made simple and easy. Tools are also the counter to scripting.

    The decisive question in this area is: How can development be simplest, fastest, and cheapest(?), and not What produces the most effective code(?).

    Were there not days when people worked in assembler because of the performance advantages?
    As then, using tools will win.
    Anton Philidor
    • Good points

      Good tools simplify development, and that matters when time is costly (and name a project where time isn't costly).

      I often talk about how easy Microsoft makes it to develop complex technology. Some in the Talkbacks call that laziness. However, when I can spin out a more feature-rich application than the not-so-lazy, roll your own types in a fraction of the time, who wins?

      Microsoft is very good at providing lots of high-level tools to developers, making their jobs EASIER. That matters, and explains why the Microsoft ecosystem still grows.
      John Carroll
      • Pick two

        [i]However, when I can spin out a more feature-rich application than the not-so-lazy, roll your own types in a fraction of the time, who wins?[/i]

        The consultant who charges obscene amounts to come along later and clean up the mess that could have been avoided by actually listening in the first place to the in-house staff who understood software lifecycle costs.

        (Speaking purely hypothetically, of course, and not as someone who had to ever wade through the dreck left by a PHB who thought that he could program because tools from a certain vendor made it easy to get something that "worked.")
        Yagotta B. Kidding
        • Yes....

          ...the old "I'm a godlike programmer, and mere mortals who use development tools that make the job easy are stupid."

          Well, I am a godlike programmer (ha ha), and using development tools make it possible for me to spend more time on areas that I wouldn't have time to spend on if forced by ideology to do more unrelated development coding for myself.

          It's a matter of time. Stop wasting it on the stuff that doesn't relate to the core task (like HTML rendering), and instead spend it on what matters. The result is a product that is BETTER because you spent your limited time in more productive areas.

          Consequently, the same principle applies in the economic theory of comparative advantage. Even though I could probably write a very good HTML renderer, my time is far more productively spent on other things. That's why a CEO who types 120 words a minute might still hand off typing responsibilities to a secretary who types 75 words a minute.
          John Carroll
          • Try again, John

            [i]...the old "I'm a godlike programmer, and mere mortals who use development tools that make the job easy are stupid."[/i]

            Having dismissed the whole point by [i]argumentum ad hominem[/i], would you care to try again?

            The programming tools address the tiniest part of the life cycle and associated costs. Making it easy to crank out small "programs" that (for instance) have key input data instantiated as constants [1] while ignoring the more significant factors in enterprise computing is [b]not[/b] a net saving for the enterprise.

            I wasn't joking about the consultants who get rich cleaning up after executives who implement their own business logic in spreadsheets. My brother is one, and he made more money before he turned 40 than I will in my life.

            At some point the auditors come around and the dread words, "Sarbanes-Oxley" are uttered, and then before you know it one of those humorless sorts in a suit asks where the revision control was, and is the current version the one that was used as input to financial reports?

            Writing code it almost trivially easy (even economists can do it) -- it's learning what code to write (along with its care and feeding) that can take a lifetime.

            [1]I've never seen that, have you?
            Yagotta B. Kidding
          • I'm sorry, but...

            ...you aren't going to convince me that ALL PROGRAMS must be built by people who are experts in so many programming domains that they could roll their own everything if called upon to do so. Fine, supermen programmers might make EXTREMELY good programs, but is that very cost effective? Does it make sense for a throwaway app to be written by programming experts, when less technical people can use builder tools to construct something that will be "good enough" for the month or two the software will be used?

            It all comes down to what you are trying to do. There are times when you need a programming guru to make structures that will stand the test of time. Other times, you want a monkey who can drag and drop components in a UI. Furthermore, there is a continuum between the two.

            On that note, even programming gurus sometimes would do well to use builder tools if it saves them the time to write the really complicated stuff. If a guru wastes his time on UI when he really should be building a distributed infrastructure for payment processing, then that guru isn't worth the money you are paying him.
            John Carroll
          • The Problem Is

            All to often that throw-away app is not thrown away. I have seen this over and over agin- That throw away app written in the old 16 Bit DOS Foxpro / Access/ VBA or Macros in Excel is still being used nearly a decade later.

            It isn't until the auditor finds major problems that people start looking- then they balk at the replacement/development costs.

            The problem with the current set of developer tools is that it makes it to easy. The schools are mostly now just teaching the tools. The new "Programers" will mock up a GUI and tie it back to some DB and think they are really programing. The problems come in when these apps fail validation...
            Edward Meyers
      • A Couple of things

        1. As Yagotta mentioned - if any idiot can create an application through a slick tool - you will end up with some idiotic applications.

        2. These tools don't do anything to EDUCATE that idiot. Doing things the "hard way" i.e. text editor and compiler - does allow you to learn things more throughly. How does one know the best way to use "stopping points", if you haven't pried apart your program - inserting print statements? Giving great tools to lousy programmers invariably leads to a single result.
        Roger Ramjet
        • No...

          [i]1. As Yagotta mentioned - if any idiot can create an application through a slick tool - you will end up with some idiotic applications.[/i]

          If the tool is good, it creates good code. Essentially, you offload responsibility for a piece of code not related to your core task to the tool maker. If the toolmaker makes a good tool, then the result is good.

          [i]2. These tools don't do anything to EDUCATE that idiot.[/i]

          Most tools are code generators that lay out the basic structure for you. In that sense, you learn with training wheels. Eventually, you may not need the training wheels so much and are willing to roll more of your own stuff. However, tools that lower the barrier to entry bring more into development, and one there, they start to LEARN by simple famliarity.

          [i]Giving great tools to lousy programmers invariably leads to a single result.[/i]

          A great developer isn't necessarily something you can make. You either get it, or you don't. Relying on the limited supply of great developers for all development tasks is costly, however. Better to figure out what tasks can be usefully done by less great developers with great tools, and apply the great developers to the truly hard stuff.

          In the end, you get a bigger pool of developers, which is good for the economy.
          John Carroll
          • Doing the wrong thing well

            [i]If the tool is good, it creates good code. Essentially, you offload responsibility for a piece of code not related to your core task to the tool maker. If the toolmaker makes a good tool, then the result is good.[/i]

            <Boggle>

            John, have you ever heard of the GIGO principle?

            Just because a tool produces an efficient instruction stream doesn't meant that it produces the [b]right[/b] instruction stream. Nothing yet has changed the old dictum that computers should come with giant warning stickers:

            [b][i]Warning: This machine will do what you tell it to![i][/b]

            I'd point you to the mountains of work done on lifecycle costs and the relationship between costs from specification errors and coding errors, but far better people than I have tried to explain them to Microsoft over the years and have never managed to get past the blank stares.
            Yagotta B. Kidding