POV-Ray : Newsgroups : povray.off-topic : C++ question for the experts : Re: C++ question for the experts Server Time
19 Oct 2024 09:06:00 EDT (-0400)
  Re: C++ question for the experts  
From: Darren New
Date: 16 May 2011 01:01:29
Message: <4dd0afa9@news.povray.org>
On 5/15/2011 21:17, clipka wrote:
> In Java the whole smash is called the Reflection API.

In C# too.

Wow, Java really vamped that up since last I looked.
http://download.oracle.com/javase/7/docs/api/java/lang/Class.html

C# has the "Type" object with similar capabilities. You can even construct 
new code and classes and such using it.

I'm not 100% sure I'm comfortable calling classes first-class objects, given 
the documentation says things like :

"Instances of the class Class represent classes and interfaces in a running 
Java application."

There's similar wording in C#.  It's more like "this type is an interface to 
manipulate classes, which aren't really first-class objects, which is why we 
give you this separate data structure to manipulate them."  It just *feels* 
like they're not first-class objects, compared to Smalltalk or JavaScript or 
something like that.

Of course, if the language provides a type that lets you do all that stuff 
to a class, whether it's "really" a class or not is a pretty meaningless 
question.

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

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