POV-Ray : Newsgroups : povray.off-topic : Generics annoyance : Re: Generics annoyance Server Time
4 Sep 2024 07:14:18 EDT (-0400)
  Re: Generics annoyance  
From: Darren New
Date: 13 Apr 2010 11:23:36
Message: <4bc48c78$1@news.povray.org>
Invisible wrote:
> Darren New wrote:
>> Actually, one place I think C++ style templates beat out generics is 
>> in this:
> 
> As I've written before, AFAIK these are two entirely unrelated 
> technologies that do totally different things.

Yep.

> Heh, just use a language that has first-class functions, and store a 
> collection of functions. ;-)

Except I want objects, and not just functions. They all have state, and 
(worse) they tend to keep pointers to each other. The gridplane needs to 
remember how big you want the grid, and it also needs to know where the 
camera is so it can draw itself, for example. The guy in the maze needs to 
know where the camera is, needs the maze structure, needs the reference to 
the gamepad, etc.

-- 
Darren New, San Diego CA, USA (PST)
   Yes, we're traveling together,
   but to different destinations.


Post a reply to this message

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