POV-Ray : Newsgroups : povray.off-topic : C++ templates to get Java-style interfaces... : Re: C++ templates to get Java-style interfaces... Server Time
15 Nov 2024 01:16:01 EST (-0500)
  Re: C++ templates to get Java-style interfaces...  
From: Warp
Date: 21 Oct 2007 06:50:02
Message: <471b2ed1@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> (I'll also note there's a bunch of benefits to doing it the way Java 
> does that C++ templates can't support, too, having to do with strong 
> typing and dynamic loading and all that sort of stuff that C++ doesn't 
> do. But that's off topic.)

  I don't understand what stops you from writing "interfaces" in C++.
Just create a class with no member variables and with all the member
functions purely virtual, and there you are. (Why you would explicitly
avoid member variables and non-purely virtual functions is beyond my
grasp, but it is possible.)

-- 
                                                          - Warp


Post a reply to this message

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