POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 09:25:14 EDT (-0400)
  Re: C++ questions  
From: Warp
Date: 26 Sep 2008 10:37:22
Message: <48dcf3a2@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Also, unlike Haskell, you apparently can't make up new operators of your 
> own, just overload the ones that already exist.

  Aren't C++ compilers already stressed enough? Think about all the problems
they would have with user-defined operators, with their own precedence
rules, ambiguous situations, etc... :P

> Well, yeah, but it's a touch harder to implement heap-allocated data in 
> such a way that your program doesn't leak like a sieve. ;-)

  You usually use the STL data containers for dynamically allocated
memory, and if what you need is to allocate a single object, you can
use a smart pointer (I posted in the other group an URL to one smart
pointer implementation I have made).

> [I'm actually surprised that using std::vector doesn't do this already...]

  Doesn't do what?

-- 
                                                          - Warp


Post a reply to this message

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