6 ms·
The initial Gosling quote gives me shivers of revulsion.
by wingo 17y ago
The initial Gosling quote gives me shivers of revulsion.
- WilliamLP 17y agoI think that very philosophy is the single biggest reason for Java's success. It's "show me where people are actually using this well", not "tell me why people ought to be using this". If you ask some people what is the practical use of certain concepts you get answers like "Uh, you can't even understand why this is so good, because your brain doesn't work in my language, see the Blub Paradox... But see how nice my factorial function looks!" Ironically, I think Java is now one of the most used language in academia, which seemed to have been explicitly an "anti-goal".
- bad_user 17y agoIf Java is used a lot in academia is mostly because it is shoved on the throats of students as one of those "real world skills that helps you get a job". Not to say that it doesn't have merits. It's fast enough, it's cross-platform, it has good tools and good libraries. But this wasn't the case until Java 1.4 was released. And its popularity has more to do with Sun's marketing campaign than anything else.
- WilliamLP 17y ago> And its popularity has more to do with Sun's marketing campaign than anything else. If you can do proof by assertion, so can I: Java's popularity has more to do with properties of the language than marketing.
- 10ren 17y agoI think he meant "used by academics in academic research", not "used by students". Both are true.
- jrockway 17y agoMe too. I had a hard time reading on after that. Java is absolutely chock-full of "things that sounded like a good idea" -- unboxed types, single inheritance, interfaces without the possibility of shared implementation (or state), public / private / protected / default, positional constructor arguments, "Type foo = new Type", etc. Actually, none of those even sound like good ideas. (But I guess after the brain damage that was C++, it was inevitable that The Industry would overcorrect. Hopefully we've learned one important lesson from Java -- making the language "simple" won't stop people from writing bad code, but it will stop people from writing good code.) Java also popularized some very very experimental ideas, like virtual machines and automatic garbage collection. (And I am very thankful for both.) So now that I think about it, I don't get that quote at all.
- mike_organon 17y agoAlso, checked exceptions were not used before, but sounded like a good idea. And they turned out to be harmful in my experience.
- jrockway 17y agoYes, you are absolutely right. They sound like a great idea, but it seems like "throws Exception" is something that gets tacked onto any method with side effects. It's just not easy to write imperative programs without throwing exceptions somewhere along the call chain. (Another thing that could have gone this way are parameterized types representing null/not-null, like Haskell's Maybe or Either. It seems like a lot of work to annotate every type that can possibly be null, but it is not onerous at all in real life. A few functions are Maybe/Either, but most aren't; and for the price of an annotation you can be sure that you will never get a "NullPointerException". Checked exceptions could have turned out this way, but something about Java, Java's libraries, or imperative programming in general made this not so.)
- bad_user 17y ago> It's just not easy to write imperative programs without throwing exceptions somewhere along the call chain With checked exceptions it is also not easy to be a good OOP citizen and not break encapsulation, since checked exceptions become a part of your interface.
- wingo 17y agoIt's not all that consistent, no. But for me what it cues is Perlis: "Algol is a blight. You can't have fun with Algol. Algol is a code that now belongs in a plumber's union. It helps you design correct structures that don't collapse, but it doesn't have any fun in it. There are no pleasures in writing Algol programs. It's a labor of necessity, a preoccupation with the details of tedium." From http://www.eecs.berkeley.edu/~bh/ss/foreword.html http://www.eecs.berkeley.edu/~bh/ss/foreword.html.
- axod 17y agoI'll have to disagree with you there. Type foo = new Type() is a bad idea? why? Shape myShape = new Rectangle(); seems pretty logical to me. If you want to use static types, you can't really argue against that syntax. single inheritance sidesteps lots of potential issues, and interfaces are cleaner IMHO >> "but it will stop people from writing good code." I'd also strongly disagree with that. Arguing that Java prevents you from writing good code is nonsense. As much sense as saying using French prevents you from writing a good story. I've seen some brilliant code written in Java (If you steer well clear of 'enterprise' etc).