[HN Gopher] Java's Cover (2001)
       ___________________________________________________________________
        
       Java's Cover (2001)
        
       Author : mliezun
       Score  : 30 points
       Date   : 2022-06-26 17:50 UTC (5 hours ago)
        
 (HTM) web link (paulgraham.com)
 (TXT) w3m dump (paulgraham.com)
        
       | mgl wrote:
       | This essay is 21 years old today, so nice piece of history but
       | hardly up to date to be relevant.
       | 
       | Not sure choosing the "wrong" programming language can kill a
       | startup just like the lack of traction and sales.
        
       | metadat wrote:
       | What if Paul had invested at least an hour or two trying out Java
       | before spending that much time writing a scathing critique about
       | why it must probably be "bad"?
       | 
       | The approach he took in forming the opinion comes across as quite
       | arrogant and error-prone.
        
         | jjfoooo4 wrote:
         | The supreme confidence and comfort with presenting evidence
         | free arguments is very much in step with most of his writing
        
         | gjvc wrote:
         | Yes. But this
         | 
         | ""The good languages have been those that were designed for
         | their own creators: C, Perl, Smalltalk, Lisp.""
         | 
         | is a fair comment.
        
           | rootlocus wrote:
           | It also misplaces C++ in that list.
        
             | [deleted]
        
           | romwell wrote:
           | _Some_ were.
           | 
           | To say that these are _the_ good languages is hubris.
        
           | ksdnjweusdnkl21 wrote:
           | Exactly. Go and Rust comes to mind immidiately. Both
           | excellent languages in my opinion crafted for the creators
           | need. Although it's maybe not quite what Paul had in mind in
           | 2001, but the world has changed a lot. A community project
           | can't really outgrow these well funded big business language
           | projects.
        
         | romwell wrote:
         | That applies to more than one article on that website :)
        
       | FpUser wrote:
       | While there are some grains of truth here and the overall post
       | reads like utter BS.
       | 
       | Myself I do not like Java at all. But I like this article even
       | less.
        
         | Jtsummers wrote:
         | Where's the BS? He presents an opinion piece and why he has a
         | particular impression of Java, and even states in the
         | conclusion that he could be wrong.
        
         | [deleted]
        
       | goto11 wrote:
       | Note that this is not about if Java was _good_ or _bad_ , which
       | is obviously a question of opinion. This is about if Java was
       | going to be _successful_ :
       | 
       | > I've never written a Java program, never more than glanced over
       | reference books about it, but I have a hunch that it won't be a
       | very successful language.
       | 
       | Given that Java became spectacularly successful and still is, the
       | question is why the author turned out to be so wrong? My guess
       | would be that the author thinks the people he know (apparently
       | all extremely competent "hackers" with great taste) is the kind
       | of people who decide what becomes popular in the industry at
       | large. We all live in our own bubbles.
       | 
       | I think the bubble of the author becomes apparent when he
       | mentions Perl positively compared to Java. Sure, Perl is fun,
       | edgy, powerful in weird ways, the opposite of Java in any way.
       | But if I had to maintain complex code written by someone else, I
       | would far prefer to maintain Java to Perl. I suspect the author
       | is the kind of developer which never have to maintain code
       | written by other programmers.
        
         | [deleted]
        
         | polotics wrote:
         | I have seen beautifully clear perl code with amazing
         | performance and great decoupling & modularity. I have seen
         | abysmal Java code full of leaky abstractions and bottlenecks. I
         | guess by now we can blame selection bias and go contribute a PR
         | to Enterprise FizzBuzz...
        
       | hintymad wrote:
       | What is amazing to me is that Java could attract such a huge
       | community, so much so that top talents could produce an amazing
       | array of libraries, frameworks, and systems. The ecosystem of
       | Java simply makes lots of daily work really easy. And no, I've
       | never used Spring or Hibernate or those "enterprise" frameworks.
       | That said, many enterprise software engineers, or so I heard, do
       | like the productivity brought forth by Spring. Frankly, I don't
       | understand why people keep mentioning Spring as if it's the
       | culprit of Java. Spring is just one of the huge number of choices
       | in Java's ecosystems. To me, Java offered great productivity
       | tools at the right time over the years. Let's not even talk about
       | communities or successful systems. Just a few seemingly small
       | things:
       | 
       | 1. IDE. When Eclipse was released back in the early 2000's, it
       | was an amazingly productive tool. Refactoring is a one or two
       | keystrokes away. Java's simple yet mostly sufficient type system
       | allows us to jump around definitions, references, usages, and
       | declarations easily. The built-in compiler of Eclipse allows
       | really accurate auto completions. I could easily learn a new code
       | base by walking through the code with a debugger while jumping
       | around the source code by semantics.
       | 
       | 2. Standards. First its servlet, but soon web containers. Even in
       | its early days, such standard made it much easier to write web
       | applications. Engineers just needed to remember a few simple
       | rules before producing concurrent web services.
       | 
       | 3. JVM and all the toolchains. All the jconsole, jstack, jmap, gc
       | logs, etc and etc. They may be norm now, but when they were
       | productivity boosters when they first came out.
       | 
       | 4. Java's standard libraries, especially the concurrency
       | libraries. All those containers and high-level synchronizers are
       | so much easier than the vanila mutex. This is something I don't
       | quite understand about the Go community: why are people fine with
       | using Mutex everywhere?
       | 
       | 5. All kinds of JSRs, such as JAX-RS. You may hate them
       | personally and passionately, but they do provide easy enough APIs
       | and most importantly a standard for all kinds of frameworks to
       | support. A Java programmer can easily switch from one framework
       | to another without much learning curve.
        
         | [deleted]
        
         | nextos wrote:
         | Even before Eclipse, there were some free (but not open)
         | versions of commercial IDEs such as Borland JBuilder. JBuilder
         | in particular was truly incredible in terms of features for the
         | late 90s-early 00s, also considering it ran well on just 128 MB
         | RAM.
        
         | marcodiego wrote:
         | > 1. IDE. When Eclipse was released back in the early 2000's,
         | it was an amazingly productive tool. Refactoring is a one or
         | two keystrokes away. Java's simple yet mostly sufficient type
         | system allows us to jump around definitions, references,
         | usages, and declarations easily. The built-in compiler of
         | Eclipse allows really accurate auto completions. I could easily
         | learn a new code base by walk the code through a debugger while
         | jumping around the source code by semantics.
         | 
         | I wonder how much Java success in early 2000's was related
         | exclusive to this. I remember asking Java programmers why they
         | liked it so much and all they talked was about IDE features and
         | not the language itself. It looked like some couldn't even tell
         | the difference between an IDE and a programming language.
        
           | Mikeb85 wrote:
           | > It looked like some couldn't even tell the difference
           | between an IDE and a programming language.
           | 
           | I mean, this is why languages like Lisp and Smalltalk have
           | such devoted fans...
        
         | torginus wrote:
         | >This is something I don't quite understand about the Go
         | community: why do people are fine with using Mutex everywhere?
         | While I wouldn't say I never used Mutex in my life, pretty much
         | all the nice high-level parallelism primities, such as map-
         | reduce, event loop-based workers, signals, cancellation can be
         | emulated pretty well with channels - using Mutex is pretty much
         | never necessary in day-to-day Go programming.
        
       | PaulHoule wrote:
       | I love Java.
        
         | tgflynn wrote:
         | Why ?
        
           | rootlocus wrote:
           | Because it has a VM (portability, multiple languages interact
           | seamlessly, bytecode manipulation at runtime, low compile
           | times), insanely fast GC, best tools in the industry (IDEs,
           | static code analysis, debugger, libraries), and it's still
           | fast enough to write HFT software with it.
           | 
           | It's even possible to compile it ahead of time, making
           | projects like a Clojure CLI scripting runtime with almost
           | instant startup time possible (babashka).
        
           | melony wrote:
           | Slow startup and build times aside, the JVM is a very robust,
           | production-ready environment. Excellent cross-platform
           | support (if we ignore pretty GUIs) and runtime performance
           | within a factor of 3 of C's. There are plenty of open source
           | libraries and the Java ecosystem is massive. The language is
           | safe and garbage collected by default, but you can achieve
           | performance on par with C when you absolutely need to. You
           | can use it for anything short of driver/kernel development.
           | Even the slow start-up time is being fixed with GraalVM. If
           | they can port over some of C#'s syntax improvements, then the
           | language would be perfect. Compared to .Net for example, the
           | JVM is much more well understood.
        
             | rootlocus wrote:
             | Graalvm has support for ahead-of-time compilation of JVM
             | languages. They promise "native executables [that] start
             | nearly instantaneously, are smaller, and consume less
             | resources of the same Java application".
             | 
             | This is how things like Babashka (Clojure CLI scripting
             | runtime) are possible [0]
             | 
             | 0. https://babashka.org/
        
               | metadat wrote:
               | Native isn't quite there yet, but once it matures and the
               | potential can be realized, it's going to be pretty cool
               | indeed!
        
           | PaulHoule wrote:
           | Clean, orthogonal design. Support for metaprogramming in the
           | form of introspection, reflection, compiling bytecode on the
           | fly. Threads that work. Threads that work cross-platform. No
           | GIL. Efficient memory allocation, garbage collection, JIT
           | compiler. When problems are found with Java they get fixed
           | 
           | https://www.cs.tufts.edu/~nr/cs257/archive/bill-
           | pugh/jmm2.pd...
           | 
           | most other programming languages make excuses. Build system
           | with dependency resolution that works (unlike Python) IDEs
           | take advantage of static nature of language. Static nature of
           | language enables refactoring.
           | 
           | Lambda syntax that's probably more concise than your favorite
           | language. Implementation of Lambdas that meshes perfectly
           | with existing practices in Java. All-virtual polymorphism is
           | one of many ways that Java doesn't steal IQ points from you
           | the way C#, C++ and languages like that do.
        
             | agumonkey wrote:
             | What about the fact that Java didn't want lambda in the
             | first places, only to hack anonymous inner classes that
             | were never well promoted until 20 years down the road
             | people realize it's quite useful to express logic as
             | functions ? :)
        
               | nextos wrote:
               | This was a mistake. Actually, Gosling said he was
               | planning to add lambdas but ran out of time.
               | 
               | Some APIs were excessively verbose due to the lack of
               | lambdas, which were emulated using anonymous inner
               | classes.
        
               | agumonkey wrote:
               | Interesting, not what I recall (but my readings on this
               | were quick). AFAIK it was carefully not pursued because
               | they wanted to make everything as classes so they went
               | with AIC.
               | 
               | If you have a link, please share.
        
               | Viliam1234 wrote:
               | > they wanted to make everything as classes
               | 
               | Java is mostly about _interfaces_. Classes are just a way
               | to implement them. This is one of the differences between
               | Java and C /C++.
        
               | nextos wrote:
               | There might be some better (primary) sources:
               | 
               |  _Gosling say closures represent the realization of a
               | dream that was postponed in Java 's early days and
               | resulted in the invention of inner classes - "an
               | uncomfortable compromise" that failed to provide the
               | desired level of simplification. He notes criticism that
               | closures are too complex, but advises people to read
               | "through all of what Neal has written"._
               | 
               | https://www.theregister.com/2008/02/01/java_closures/
        
               | agumonkey wrote:
               | I think I read about early java design on c2. I might dig
               | later.
        
               | Tomte wrote:
               | Who cares? Are you a programmer or a historian?
               | 
               | Thing is, they turned it around.
        
               | agumonkey wrote:
               | Please could you stay on a normal discussion level ?
        
               | kaba0 wrote:
               | Because it came from a very different time, following
               | closely in C++'s OOP madness footsteps.
        
               | PaulHoule wrote:
               | Inner classes are pretty useful.
               | 
               | This library contains a huge number of Iterables, each of
               | which has at least one Iterator implementation.
               | 
               | https://github.com/paulhoule/pidove
               | 
               | It is convenient to let the Iterator be immutable and the
               | Iterator be an inner class that gets its configuration
               | information out of the Iterable.
               | 
               | (That said, if people really thought seriously about
               | Iterator being a Supplier<Iterable> people might think
               | more rationally about error handling. Also in a slightly
               | parallel universe the Iterator would only have one method
               | since remove() hardly ever gets used and having both
               | hasNext() and next() methods is asking for bugs.)
        
       | spacemanmatt wrote:
       | I hope hindsight is 20/20 for everyone else. Java has delivered
       | like crazy on a lot of promises that were widely considered hot
       | air at the time.
        
         | [deleted]
        
         | PaulHoule wrote:
         | I was coding in Java before it reached 1.0.
         | 
         | I remember getting into an argument with two guys in the men's
         | room in Center Ithaca circa 1995, they thought Java was
         | overhyped, I thought it was going to to be big.
         | 
         | I was right, with the caveat that the original "applet" use
         | case where you wrote little GUI apps to run in a rectangle in a
         | web browser turned out to be a complete wash.
        
           | agumonkey wrote:
           | not a lot of java's original goal succeeded, applet died,
           | desktop died .. for some reason it matched well with
           | enterprise in a time where heavy would sell in big companies
           | 
           | in a funny way, the jvm hitting android made it the networked
           | desktop of the world, but in no way sun/oracle predicted it
           | :)
        
             | PaulHoule wrote:
             | I find it kindof odd that the Blu-Ray disc adopted Java as
             | a standard, that is, every Blu-Ray disk is really a big
             | Java "applet" that runs on the player. Pretty frequently
             | the "applet" is a stock player with a small amount of
             | customization since Hollywood isn't any more interested in
             | software development than TV station owners: that is, an
             | interactive ATSC 3 TV channel is just a single page app
             | that gets events from a websocket server embedded in the
             | TV.
        
             | kaba0 wrote:
             | Well, Sun did offer Java free of charge for everything
             | except mobile (hence the infamous lawsuit), so it's not
             | like they didn't think of that.
        
       | abetusk wrote:
       | Looking back, I think we can be a bit more circumspect. For me,
       | the most relevant points are:
       | 
       | """ ...
       | 
       | 7. It's bureaucratic. ...
       | 
       | ...
       | 
       | 9. It's designed for large organizations. ...
       | 
       | ...
       | 
       | 10. The wrong people like it. ...
       | 
       | ...
       | 
       | """
       | 
       | These might all be shades of the same underlying cause but, for
       | me, this is exactly why Java has "failed" in many domains and
       | "succeeded" in others. Precisely because it was marketed as
       | boring technology that large organizations could use is the roots
       | of it's success in business domains and it's failure in "hacker"
       | domains.
       | 
       | Daniel Sockwell had a talk about the "Ideal Language for Writing
       | Free Software" [0] and many of the points are mirrored about what
       | makes a language well suited to an individual maintainer of a
       | FOSS project that allow them to use its high skill ceiling and
       | the programmers deep knowledge of the language are the things
       | that business interests select against to allow for programmer
       | fungibility.
       | 
       | [0] https://www.youtube.com/watch?v=MCKozTfcWr4
        
       | mattgreenrocks wrote:
       | Most of these points apply to a lot of languages en vogue today.
       | I'm not quite sure what to make of that in light of these points,
       | but thought I'd point that out.
        
         | mftb wrote:
         | You're right. What this article fails to anticipate is that,
         | "Hacker's Radar", won't be what matters. It takes great pains
         | to make clear that it's not about Java, but hacker radar and
         | how that leads him to reject things like Java. Well, in the era
         | we live in now, hacker radar has taken a back seat, to bean
         | counters, pitchmen, and CEO's blabbing endlessly on Twitter,
         | and while all of them claim to be Tech-CEO's and pitchmen,
         | etc... The truth is once those people take over, the tech will
         | never be their priority, with bean counters it's always about
         | the beans.
        
           | ibains wrote:
           | Thank god solving customer problems has taken over the tech-
           | ceo job, starting with tech is usually a bad idea, even when
           | it is innovative (crypto-ponzi as an example)
        
             | mftb wrote:
             | Well that's interesting, because you and I see things
             | exactly opposite. In the era I started, before this article
             | was written, there were, in many cases, no customers. The
             | users and the creators were frequently the same people. New
             | technologies had much more time to be implemented before
             | they were actually brought to market and productized.
             | Nowadays new technology is saddled with unrealistic hype
             | and expectation before anything is implemented at all.
             | We're probably just going to be in disagreement about that
             | point. As to your point about business people caring about
             | the needs, and concerns of their customers, I have to be in
             | agreement with you about that.
        
         | pharmakom wrote:
         | Reading the points made me think of Go in a few cases.
        
         | woodruffw wrote:
         | One interpretation is that pg was hilariously wrong in 2001,
         | and that similar arguments in 2022 are unlikely to hold water
         | _in and of themselves._ The particulars might be true in any
         | single instance, but pg's qualities for success are obviously
         | not necessary.
        
       | rootlocus wrote:
       | Reverse hype in a nutshell: "I don't know it, but I don't like it
       | because it's overhyped by people I don't respect"
        
       | rr808 wrote:
       | My view is Java is good. Spring ruined it.
        
         | brazzy wrote:
         | You _liked_ EJB 2 deployment descriptors?
        
         | rootlocus wrote:
         | Java EE != Spring Framework != Spring Boot
        
           | rr808 wrote:
           | Java == Spring Framework In most corporates I've worked in.
           | I'm lucky to work in a vertx project now so it can be done,
           | but Spring is in every project in my last co.
        
       | marcodiego wrote:
       | > Historically, languages designed for other people to use have
       | been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have
       | been those that were designed for their own creators: C, Perl,
       | Smalltalk, Lisp.
       | 
       | This comment didn't age well.
        
         | ksdnjweusdnkl21 wrote:
         | Does a programming language have to live vibrantly for 3
         | decades to be "good"? I don't think so. Use it while it's good,
         | then move on to or create the next good thing.
        
           | bborud wrote:
           | The longer it lives, the more your investment in learning
           | thoroughly it pays off. But languages also have a tendency to
           | accumulate features until taking on a cancer-ridden look. I
           | probably stick to a given "main workhorse" language for about
           | a decade on average. So I would agree that if a language gets
           | a decade of being good, it is about as good as you can
           | expect.
        
         | karmakaze wrote:
         | With the exceptions of Perl and perhaps Ada, I still tend to
         | agree with this. C++ is only okay because of the libraries that
         | make it suck less.
         | 
         | What the statement doesn't do is support the opinion that Java
         | will be unpopular for being a bad language.
         | 
         | The thing that made Java succeed was the write-once-run-
         | everywhere JVM and the huge effort spent by Sun, IBM, and
         | others to make the JVM as good as it is.
        
         | bborud wrote:
         | Choice of programming language is almost always a decision of
         | whether you want to stand alone, or whether you want to stand
         | on the shoulders of the multitudes. Some of which are indeed
         | geniuses. Standing alone is always a poor choice. Not
         | understanding that means not understanding that programming is
         | a highly social activity.
        
       | rfiat wrote:
       | > It has been so energetically hyped. Real standards don't have
       | to be promoted
       | 
       | I find this interesting because it's the first heuristic I use to
       | judge anything new, technical or otherwise (e.g. TV shows or
       | games). Did someone pay to put it in front of me?
       | 
       | It turns out to be a mostly true assumption that you'll hear
       | about good things organically.
        
         | deepsun wrote:
         | Well, Go hype was such much. But it turned out not that bad
         | actually.
        
         | brundolf wrote:
         | That's true when it comes to art, but I have almost the
         | opposite feeling when it comes to things that require a network
         | effect to be worth investing in
         | 
         | I'll readily judge a new programming language or library based
         | on the quality of its presentation, because if no thought is
         | being given to presentation, I can tell already that it's not
         | going to get much traction. And if a PL doesn't get much
         | traction, its ecosystem and even its long-term development will
         | likely suffer.
         | 
         | Although- that's really just a minimum bar, and I agree with
         | the author that Java went way way beyond that, and had more
         | money tied up in that than felt warranted, so I probably would
         | have had the same feelings
        
           | rfiat wrote:
           | What you say about traction is a good point. I think "will it
           | be successful?" is a very different question to "will I like
           | it?".
           | 
           | At one end of the scale for me is Rust. I discovered it
           | through organic hype and I like the language but it's not
           | successful enough for me to have found a job writing Rust.
           | 
           | At the other end is TikTok. I saw many ads for it before
           | anyone I know ever talked about it. It's massively successful
           | but it doesn't appeal to me in the slightest.
        
       ___________________________________________________________________
       (page generated 2022-06-26 23:02 UTC)