Generics

Daniel Altman daniel at qkss.com
Fri Oct 3 13:19:06 UTC 2003


Hi Göran!

I agree with all you said, except this one:

> The problem here is that Smalltalk being a dynamically (vs statically)
typed
> language it becomes very hard to do compile time analysis of the code and
> through that come up with any compile time type errors. So the notion of
> generics/templates/whatever simply have very little *compile time* meaning
in
> Smalltalk.

There was some work about type inferencing that may be very useful here.
Francisco Garau has built a type inferencer in Squeak. It could help us to
do some static type error checking.



======================================
Daniel Altman
Buenos Aires, Argentina


"Göran Krampe" <goran.krampe at bluefish.se> wrote in message
news:1064789601.3f776661f0fc9 at mail.bluefish.se...
> Hi all!
>
> Ah, type discussions... Almost as yummy as inheritance discussions...
>
> Citerat från Phil Hudson <phil.hudson at iname.com>:
> > >On Sun, Sep 28, 2003 at 01:05:13AM +0100, Phil Hudson wrote:
> > >> Are generic/template/parameterized/typesafe collections available in
> > >> Smalltalk?
>
>
> Smalltalkers (and other developers fond of dynamically typed languages)
have
> generally found that not having to type all that crude static stuff (and
retype
> it when refactoring etc, cascading dependency changes blabla) gives us
much more
> time to do more important stuff. We spend that extra time finding the
*real*
> bugs instead - for example by writing good unit tests or whatever. So for
us the
> advantages of dynamic types clearly outweighs the disadvantages. (I am
> generalizing here of course)
>
> There have been at least one major investigation that (if my memory
serves)
> showed that only 3% of the errors that the developers made when developing
a
> system was found by the compiler using static type checking. I would guess
that
> the overhead of maintaining that static type system in the code took much
more
> time than it was worth.
>
> Ok, finally - I do not want to participate in a "static vs dynamic types"
> discussion - and definitely not in this forum :-).
>
> I have been involved in those for so many times and have come to the
conclusion
> that discussing it with people who only have experience with one side of
the
> coin (mostly the "static types" side) doesn't lead anywhere. I have
programmed
> in C/C++/Java/Smalltalk and many other languages - so I know both sides.
>
> regards, Göran
>
> Göran Krampe, goran.krampe at bluefish.se
> GSM: +46 70 3933950, http://www.bluefish.se
> Smalltalk - a place where objects live, not a language.
>
>





More information about the Squeak-dev mailing list