POV-Ray : Newsgroups : povray.off-topic : C++ templates to get Java-style interfaces... : Re: C++ templates to get Java-style interfaces... Server Time
11 Oct 2024 15:18:00 EDT (-0400)
  Re: C++ templates to get Java-style interfaces...  
From: Darren New
Date: 22 Oct 2007 10:32:20
Message: <471cb474$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> Warp wrote:
>>> Darren New <dne### [at] sanrrcom> wrote:
>>>> It just doesn't give you the same benefits that doing it with 
>>>> Java does, due to the nature of the compilation process and object code 
>>>> storage formats.
>>>   What benefits are those?
> 
>> Strongly typed separate compilation units, and strongly typed dynamic 
>> loading, for two.
> 
>   I don't understand what that means.

Sure. Give me the .o file that corresponds to your template. (And before 
you explain that isn't how templates work, yes, I know. That's the point.)

Then compile three different C++ classes that have + and * and a fourth 
that doesn't into DLL files, and let me pass them into *my* template 
that requires + and * and make sure all four give me a well-defined result.

You *could* do that with code and data-allocation included, but it would 
be a lot more difficult.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

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