POV-Ray : Newsgroups : povray.off-topic : Unit Testing question : Re: Unit Testing question Server Time
30 Jul 2024 00:28:37 EDT (-0400)
  Re: Unit Testing question  
From: Orchid XP v8
Date: 10 Jun 2011 17:03:15
Message: <4df28693$1@news.povray.org>
On 10/06/2011 09:11 PM, Darren New wrote:
> On 6/10/2011 11:26, Orchid XP v8 wrote:
>> Yeah, well, Smalltalk is no functional language. ;-)
>
> Oh, sorry, I thought we were still talking about Haskell.

Uh, yeah. You can't do anything crazy like that in Haskell.

Worst thing you can do is unsafePerformIO. Also known as "tell the 
compiler that its assumptions hold for this expression, because I say 
so". Naturally, if you are mistaken... bad things happen.

> Yeah, the thing is when you compile the expression #[1, 2, 3] it creates
> a list and points the executable code to that, or some such.

That's the one.

>> When you define a class named Foo, it defines a global variable named Foo
>> which contains a Class object describing the class.
>
> Yes. But "global variable" is a bit of a misnomer in a language where
> global variables are simply names in a hashtable that the compiler looks
> up at runtime.

Not just the compiler. The entire runtime system. And since the IDE *is* 
the runtime system...

> I think true, false, and nil are usually special-cased in the compiler
> (along with ifTrue:ifFalse:, etc) for performance reasons. But yes, in
> theory, you could do that.

It probably varies by implementation. I suppose I could dig out my copy 
of VisualWorks if I /really/ cared...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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