POV-Ray : Newsgroups : povray.off-topic : How does Haskell work? : Re: How does Haskell work? Server Time
4 Sep 2024 15:23:16 EDT (-0400)
  Re: How does Haskell work?  
From: Orchid XP v8
Date: 17 Mar 2010 16:14:07
Message: <4ba1380f$1@news.povray.org>
>> At a simple level, you could just scan the source when you compile it, 
>> and replace any calls to the #ifTrue:ifFlase: method (and friends) 
>> with the appropriate machine instructions.
> 
> Internally, that's what it does. Of course, if you send that to 
> something that isn't a boolean, *then* you get an even bigger overhead.

Sure. If you had static typing, you could statically guarantee that this 
won't happen, and avoid handling it.

OTOH, Smalltalk basically allows you to define new flow control 
constructs of your own, so...

> This is not something that noticably slows things down, tho. When 
> *everything* is a message dispatch, you can design your microcode to do 
> that efficiently.

Oh, sure. Simplicity can be a boon to efficiency. I'm just saying, 
Smalltalk isn't targetted at scientific computing, realtime simulation, 
DSP or high-end computer gaming. ;-)

-- 
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.