Readable Java 1.5
Subject:   Cholesterol - WTF? - I want Smalltalk
Date:   2003-10-03 22:02:31
From:   anonymous2
Response to: Cholesterol - WTF?

Snif sniff, all these syntax sugar sucks!
I want Smalltalk!! ... sadly Java is so popular that I have to work with it :-(

The need for generics is a myth, from C++.
With today's method dispatching techniques -- like inline cache-- (researched by Sun in the Self Language) there is not really a real performance gain with generics, and static type checking.
In fact static type checking bothers in a OO lang... one example: the need of javabeans that makes extensive use of reflection.
I think that static type checking must be optional (like in StrongTalk... again another researh language of Sun)
And the use of Iterators makes poor encapsulation of container objects.
I like the Smalltalk collection aproach, with "code blocks", for example to call the "print" method in each element you can do:

aCollection forEachElementDo: [:elem | elem print].

note1: forEachElementDo is not language construct is a method of the aCollection instance.
note2: [ code ] creates an instance of Block

1 to 3 of 3
1 to 3 of 3