POV-Ray : Newsgroups : povray.off-topic : Programming language discussion : Re: Programming language discussion Server Time
3 Sep 2024 17:14:24 EDT (-0400)
  Re: Programming language discussion  
From: Darren New
Date: 22 Oct 2010 17:02:50
Message: <4cc1fbfa$1@news.povray.org>
Warp wrote:
>   Of course in this case this is just a trick to have two naming
> conventions to access the same data (rather than to save memory).

That's cool. FORTRAN had this too (a la "named DATA blocks", which is to say 
what C would call "static" variables with names), and I'm pretty sure it was 
there to save memory. Of course, that was back when 4K was a big machine.

>   It's actually really handy in Objective-C when developing for the iPhone.

It's really handy in PHP too. ;-) Seriously, the "@" operator in PHP is all 
kinds of convenient.  It's basically a one-character way of saying
try { ... } catch {}.   So { X = @yadda(this, that()); } means X gets an 
empty string if either yadda or that throws an error, or "this" isn't 
defined, or whatever.

As long as the convenience outweighs the problem you get when you didn't 
*expect* the thing to be NULL, you're good. Phone app? Sure.  Missile 
launcher? Bad idea. :-)

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

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