[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

David Naseby

11/6/2003 5:46:00 AM

>
>Hmm .. by the way, aren't you arguing against duck-typing here?
>If someone deliberately creates a type which is *like* a Float, then
>this code would force it to be a real float (assuming that to_f returns
>a real Float object).

Just weighing in with a small point, but
1.0.to_f #=>1.0

A type *like* a float responds to to_f, to give a float. For any type to act
like a float, it must quack like a float, in the sense it gives a meaningful
float when it hears to_f. #to_x messages are just messages. It is not
casting - unless you are wacky enough to write a #to_f! method. Its asking
the object to show its face as a float.

David.

1 Answer

Jeff M

3/3/2009 5:58:00 PM

0

terryc wrote:
> On Tue, 03 Mar 2009 09:05:56 +0000, krp wrote:
>
>
>> You are DENSE. Ask any of your fellow Aussies that fought in that
>> war.
>> They'll set a dense SOB like you straight in short order.
>
> It must have been the way the yanks ran their theatres. The aussies said
> they had no trouble identifying the fervent.
>
>
>> I am amazed at the pervasiveness of your stupidity. You'd better
>> think
>> of something. The main reason YOU are not speaking Japanese is that same
>> Army (and Navy and Air Force) you HATE with every cell of your body. Yep
>> the YANKS!
>
> mwhahahah, keep trying to rewrite history. The USA only entered the
> scene after the Australians and Indians had brought their advance to a
> stand still.

The Aussies, Kiwis, Indians and Dutch fought with unquestioned
determination and heroism. Unfortunately, they suffered from poor
(British) leadership, diversion of resources to the European theatre,
where they had been in the fight from the beginning, and the same degree
of unreadiness as U.S. forces.

However,they were unable to stop the well trained, equipped and led
Japanese forces on land, and simply had no means to stop the IJN at sea.
Australia would have been reduced and invaded (with tough Aussies
making them pay for every inch) without the presence of the USN
carriers' fleet air power. That really can't be disputed. The battles
of the Coral Sea and Midway ended Japan's plans against Australia.
However, the Aussies' brave resistance helped buy time for the allies to
organize and begin the long march to victory.

Jeff Mc