POV-Ray : Newsgroups : povray.off-topic : Haskell vs Java: Building a ray tracer : Re: Haskell vs Java: Building a ray tracer Server Time
29 Jul 2024 08:15:43 EDT (-0400)
  Re: Haskell vs Java: Building a ray tracer  
From: Invisible
Date: 29 Jun 2012 03:53:22
Message: <4fed5ef2$1@news.povray.org>
On 28/06/2012 11:28 PM, nemesis wrote:
> [tldr]

That's the story of my life.

>> Notice, however, that it is impossible to write an
>> "unwrap" function. Because once you "wrap" something, its original type
>> information is lost forever, so there's no way in hell to know what type
>> to cast it back to.
>
> what about in heaven?  In Lisp there's no such hellish troubles. :)

No. In Lisp, there are no types at all. :-P

> So your solution to get away from the complaints of the compiler is to have all
> types be the same single type?  Yes, sounds like the Lisp solution too. ;)

Not all types, just all /shape/ types. There's the difference. In Lisp, 
you can put any value anywhere. Haskell (and Java) allow you to require 
that all the elements of the list have specific properties.

>> Not exactly a revelation, is it? I think
>> I'm going to go outside for a while...
>
> you do good. :)

Hmm.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.