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:19:51 EDT (-0400)
  Re: C++ templates to get Java-style interfaces...  
From: Darren New
Date: 22 Oct 2007 10:51:20
Message: <471cb8e8$1@news.povray.org>
Warp wrote:
>   Uh, I was comparing Java interfaces with C++ classes with only pure
> virtual functions and no member variables. That's exactly what I asked:

Oh. I was referring to the benefits of
"""
I'll also note there's a bunch of benefits to doing it the way Java does 
that C++ templates can't support
"""

I hadn't realized you'd changed subjects.

> What is the difference between these two things? You responded with what
> I quoted first above.

Pretty much the same benefits. Separate compilation with strong typing, 
and dynamic loading with strong typing. Again, there's nothing really 
*stopping* a C++ compiler from doing strong typing for compilation and 
dynamic loading - it just isn't part of the language. (I.e., in the same 
way that nothing stops C++ from having threads, but it isn't part of the 
language you can count on.)

-- 
   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.