3 ms·
>> "The second half of the book is how to apply the principles to Java code. Which is horrendous! Not the book. If you should be so unfortunate to be stuck tryi
by axod 17y ago
>> "The second half of the book is how to apply the principles to Java code. Which is horrendous! Not the book. If you should be so unfortunate to be stuck trying to write good code in Java, the book is a great, lucid description of how to do so. Yet in Java, it’s hard to get anything shorter than ten or twenty lines of code. See some code duplication, and by the time you’ve written the classes and interfaces and methods you need to write to remove the duplication, the code is just as long as it was before."
Yeah you're doing something wrong there. I know it's fashionable to bash Java and say how lame and verbose it is, but it does wear a bit thin. I actually enjoy writing Java. Perhaps due to me having grown up programming assembly - I don't mind verbosity. Java is an extremely solid fast language.
- jimbokun 17y agoAnd a big part of the value proposition of Clojure is that it gives you Lisp's ability to eliminate almost all duplication with macros alongside most of the benefits of Java.
- abstractbill 17y agoJava is an extremely solid fast language. You mean "the JVM is an extremely solid fast runtime" - languages by themselves aren't fast or slow ;-)
- deleted 17y ago[deleted]
- axod 17y agoRight - Java as a word is heavily overloaded ;). For me, that's the bit that matters - the JVM. Java is just something I use because it's easier than writing bytecode :/ Java as a language, the syntax, is for me sane. It gets a lot of things right, and some things wrong, but on balance, it's sane enough to use. Just like English as a language is sane enough to use, whilst having lots of stupid inconsistencies in spelling/pronunciation etc. And it's likely to be the fastest/most optimized of any JVM target language.
- CatDancer 17y agoI apologize, it was not my intent to bash Java.
- axod 17y agonp :) and apologies for taking the comments off topic. Do linguists agonize over language efficiency as much as some programmers do? For example, writing English is maybe far more letters/strokes than Japanese (idk), but we don't all start learning Japanese and bash English.
- natrius 17y agoIf the Sapir-Whorf hypothesis is true, then they should if they don't already. If the Sapir-Whorf hypothesis is true for programming languages, then our agonizing is perfectly reasonable. http://en.wikipedia.org/wiki/Sapir–Whorf_hypothesis http://en.wikipedia.org/wiki/Sapir–Whorf_hypothesis
- whacked_new 17y agoI often get jumped on for my views, but S-W is true, and untrue. Untrue in that absence of a direct expression implies absence of concept; true in that absence of a direct expression impedes such an expression, such that it is less likely to get used, and hence, less efficient, and less likely to be conceived. And I certainly agree that S-W applies for human and computer languages alike.
- whacked_new 17y agoFrom what I have seen (not much, but probably more than most programmers), they don't. I suspect the reason is because everybody has at least one native spoken language, but programming languages are not native in the same way; they are acquired, and so are not perceived as a necessity. And as such, for most people it is much harder to have a "favorite spoken language" that they can use as a platform to bash other languages. The way that programmers, text editor users, and coffee drinkers bash each other is bashing someone for an acquired taste. Bashing other languages is almost like bashing someone's physical appearance, and the immaturity becomes very obvious a lot quicker. Also, regarding compactness of the spoken language, on average, English is longer than, say, Chinese. But brevity is NOT the goal. The tradeoff is redundancy, which English has much more of (e.g. parallelism and verb/plurality agreement). Old Chinese, with all its homophones, has plenty of texts written so compactly that if you don't read the text you will not understand it (at least for modern pupils).