[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Managing metadata about attribute types

Christoph R.

11/9/2003 3:17:00 AM

Ryan Pavlik wrote:

...

> > You must not be a big fan of class methods :-)
>
> I'm not sure what your point is here. The only conceivable
> point I can see is that class methods are singleton objects
> of type Class, and that if I ask for a Class, I may get one,
> but it won't be the exact API of Class if I use class methods.
>

On a related note instead of

def foo
expect s, String
...
end

it might make more sense to write

def foo
String.execpt s
...
end

...

> Anyway, you will obviously never accept my position, and I've
> had too much success with strongtyping to give it up, so add
> any closing points you wish to make and let's wrap this one
> up so we can get back to doing something productive... like
> writing ruby code. ;-)

Yup, David is a well know diehard single-dispatch
apologist:-)

Looking at the code of complex or rational from the
Standard library or quaternion from RAA (maybe it was
called hamiltonian) it is pretty clear IMO that the
uncompromising (i.e. strong:-) anti strong-type
sentiment for every occasion, falls flat on it's
face.

The coarse framework is obviously a band aid for the
missing type-based method dispatch (``coercing'' itself
is a really neat trick, but it is cumbersome to use and
makes extending things a nightmare).


/Christoph