From: gabriele renzi Date: 2005-12-11T21:27:39+09:00 Subject: Re: lib for optional static typing dblack@wobblini.net ha scritto: > Hi -- > > On Sun, 11 Dec 2005, Daniel Berger wrote: > >> Evan Webb mentioned that it would be possible to add a pseudo type >> system via Behaviors. He may even have a working implementation for >> Sydney, but I'll have to double check. It would look something like >> this: >> >> # pseudocode >> require "behavior/strongtyping" >> >> def foo(String x, y) >> end >> >> In this example, x must be a String, while y can be anything. In >> effect, optional typing. > > > s/typing/ancestry-checking/ I probably said it many times, but what if we provided real type checking? I think this is what common lisp does. Checking against an ancestor is just a subset of a general checking-against-some-real-procedure. We could default to calling === to get ancestor checking for free. Oh, the nicety of def Math.sqrt(Positive p) :)