POV-Ray : Newsgroups : povray.off-topic : And today, C# : Re: And today, C# Server Time
11 Oct 2024 03:14:21 EDT (-0400)
  Re: And today, C#  
From: Darren New
Date: 20 Feb 2008 18:59:05
Message: <47bcbec9$1@news.povray.org>
Warp wrote:
>   OTOH, why would that be a bad thing? 

You lose a whole bunch of things the compiler can optimize.

If you do
   "let x = replace offset 27 in y with 'hello'"
(i.e., y[27]='hello')
and then use "x", the compiler can often figure out that y isn't used 
any more and update it in place.

Sort of like using tail recursion instead of iteration, but they're both 
equivalent.  Or avoiding loops in APL. Or avoiding cursors in SQL.

And yes, sometimes (often, for me) it gets awkward. You sometimes have 
to spend some time figuring out how to do it functionally, but it gets 
easier with practice.

-- 
   Darren New / San Diego, CA, USA (PST)
     On what day did God create the body thetans?


Post a reply to this message

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