Saturday, 04 October 2003

About Smug Lisp Elitism

I’m a relatively inexperienced programmer. My first language language was Visual Basic 2.0, so perhaps I’m missing something.

On the other hand, I’m right now doing a Java assignment, and being thoroughly annoyed by the language.

For instance, there is an arbitrary distinction between types such as chars, ints, booleans and the like and types such as String, LinkedList or Employee. I’ll be damned if I can work out why I can’t switch over a String, simply because it’s a String.

Its syntax feels like it was designed by someone who only knew C, which isn’t surprising given that that’s what it’s designed to be like. C, however, has a very bad syntax. Not having keywords or equivalents is incredibly annoying—the only way to know whether foo.pay(12, 34) means give foo $12 over 34 weeks or $34 over 12 weeks is by memorising the method. I’d much rather be programming in Lisp where I can say (pay foo :amount 12 :weeks 34) or in Objective C with [foo payAmount: 12 weeks: 34] (I think, I don’t know ObjC enough).

And all those complaints about the prefix syntax—what’s with them? How does foo.pay(12, 34); reflect any better ’pay foo $34 over 12 weeks’ than (pay foo :time 12 :amount 34)? (We all know that 3 + 4 is more natural than (+ 3 4), but the cake cuts in two ways.) The syntax is just syntax. Rumor has it that Lisp’s syntax gives it significant advantages over other languages, pity about the look. Seeing as neither syntax is better at reflecting English than the other, why is that a strike against Lisp? Lisp isn’t any harder to read than, say, Python, given that most Lisp code is well-idented. And because it doesn’t have the braces, you don’t get people complaining about where to put ’em :)

I’m also a firm believer in Object-Orientation-​Doesn’t-Solve-All-​The-World’s-Problems-ism. Java is a firm believer in If-Object-Orientation-​Doesn’t-Solve-This-Problem,-​Look-Elsewhere-ism. When I have the pains of having to deal with something object orientedly that simply doesn’t work like that more freshly in my brain, I’ll make a post of them.

Java’s I/O leave something to de desired. BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in));?

And Lispers aren’t the only people who forget the truth about their own language. I suggest some of them look into Objective C. If Objective C had taken over the world—good luck to Apple—then it would be that much better (than it is given that Java has). And YES and NO are much funkier than true and false :)

(PS: that isn’t all my complaints with Java. Java jenerally sucks.)

Update (8.14 p.m.): One example of object orientation’s badness as implemented by Java is Integer.parseInt(aString)int. What this does is reads aString representing a number which can be stored by an intand returns that int. It is a static method (i.e. a(n object disoriented) function). Upon seeing it, my reaction was something like «that really should be aString.parseInt()int», so, for instance "3".parseInt() would return 3. In fact, I’m reluctant to say it shouldn’t not be that in Java: it does have the rather stupid and arbitrary distinction between the built-in datatypes and class-based datatypes, so it isn’t that unreasonable for a class to implement some of that stuff on it’s own. The thing is: sometimes we will be implementing type A when we want to convert from type A to type B, but other times we will be implementing type B. With these mono-methods, we will get things like aSchool.convertToShoppingCentre() and aSchool.convertFromLibrary(). Very ugly.

Comments

Eleanor Rigby, picks up the rice
in the church where a wedding has been
Lives in a dream

I am not one of those who think that the people are never in the wrong. They have been so, frequently and outrageously, both in other countries and in this. But I do say, that in all disputes between them and their rulers, the presumption is at least upon a par in favour of the people.

I am not one of those who think that the people are never in the wrong. They have been so, frequently and outrageously, both in other countries and in this. But I do say, that in all disputes between them and their rulers, the presumption is at least upon a par in favour of the people.

I am not one of those who think that the people are never in the wrong. They have been so, frequently and outrageously, both in other countries and in this. But I do say, that in all disputes between them and their rulers, the presumption is at least upon a par in favour of the people.

7823 http://harley-parts.ownsthis.com motorcycle parts harley parts harley davidson parts

604 http://www.texas-hold-em-i.com play texas hold em online here.

6731 http://www.texas-hold-em-i.com play texas hold em online here.

1104 well said ol' boy!

4890 http://slots-online.fateback.com/roulette.htm

online roulette

Nice site yo got here! I really like it!

1180 http://www.e-texas-holdem.info

texas holdem

6183 http://www.e-texas-hold-em.com

texas hold em

8163 http://www.rapid-debt-consolidation.com

consolidate debt

Post a comment










Remember personal info?