[C++-sig] enums and structs

joel de guzman djowel at gmx.co.uk
Mon May 20 05:21:28 CEST 2002


----- Original Message ----- 
From: "David Abrahams" 

> I like the Phoenix-isms, and I even think it might make sense to re-do the
> entire interface that way at some point:

[snip]

> Whatever happens, classes, enums, and modules should probably all use a
> consistent interface...
> However, the above approach would complicate things quite a bit, since the
> wrapped class type needs to interact with the member pointer type (see the
> member_function_cast ugliness in the implementation). We'd need to switch
> to a delayed evaluation scheme for the def() functions, and I don't think
> it's time to do that right now.
> 
> Also, the interface direction from my email was supposed to produce a
> different result than enums-as-ints... though I guess there's no reason we
> couldn't start with as-int conversion and switch to int subclasses later,
> using the same interface.

The syntactic sugar can sit atop the current interface, possibly
in a sub-namespace to avoid name conflicts. The interface as 
it is need not be changed at all. I'm having some progress with 
deferred evaluation in Spirit/Phoenix and I think that this is an area 
where I can contribute to the Python code base. I agree though that 
this should be done later, especially when I get some more spare time. 
For now, I'll see if I can get a sufficient enum-interface up and running. 

> I hope you've been watching the CVS documentation as it gets updated.
> Things are getting better...

I'm enjoying the experience every single bit :-)

Regards,
--Joel








More information about the Cplusplus-sig mailing list