Everything sux

Wednesday, August 11, 2004

As usual: type system debate

It's impressive how many thing people have to say about typing.
There must be a reason for this, something that relates to a fundamental need of the human being.

Anyway, james robertson, ian bicking and ryan loweLink

Are playing with the usual "oh types sux" or "oh type rulez". They're nice and smart guys so worth reading, prolly.

Btw, here is my take on this:
type do exist. It does not matter how long you're saying that Ruby or ST or Python or Io allows you to avoid them. You're just ignoring them. But in the mnomento you're writing:

sc= SortedCollection new

you're using a type. In the rest of the program you'll be expecting to have a SortedCollection.

So you're declaring a type. And then you are using that type in a conforming way, because if you don't you0ll get an exception. this extends to languages like ruby or python (or CLOS) where you can add methods to a single object. You're still using that object's type.

Now add this, what would you do if I was going to tell you "well, go on doing like this, I'll add an expressive type system that you won't even notice. It will just add safety and early catching of errors".

Now, we do not have such a type inference engine yet, but we're on the track.
Take a look at Nice or haskell. They're not there yet, but some day some language will be.

Then the congepture will be demonstrated: "dynamic typing is just an expressive static type system"



0 Comments:

Post a Comment

<< Home