http://d.puremagic.com/issues/show_bug.cgi?id=4427


Jacob Carlborg <d...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |d...@me.com


--- Comment #5 from Jacob Carlborg <d...@me.com> 2010-07-07 04:02:46 PDT ---
(In reply to comment #4)
> I would expect that immutable and const variables would still be variables,
> just not mutable ones. If you wanted to know whether they were const or
> immutable, you could do a separate test for that on top of checking whether
> something was a variable, just like you'd do if you wanted to know whether it
> were static.
> 
> Personally, I've been trying to figure out how to get the list of non-static
> member variables out of a class at compile-time, and it's been a bit of a 
> pain.
> And for what I'm doing with them, I wouldn't care whether they were immutable
> or const.

You can use object.tupleof to get a list of member variables of out a class at
compile time. You can also have a look at
http://www.dsource.org/projects/orange/browser/orange/util/Reflection.d (look
for the templates/functions containing "field") to get some ideas to implement
helper templates/functions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to