From: Vadim Z. <vz...@ze...> - 2014-01-06 18:54:04
|
On Mon, 06 Jan 2014 18:41:04 +0000 William S Fulton <ws...@fu...> wrote: WSF> If we make the default to be 'flatnested' for both C and C++ for all WSF> target languages we have a very consistent default approach. Both WSF> between C and C++ as well as between different target languages, some of WSF> which do not yet implement true nested classes and some of which never WSF> will because either there is no equivalent or nobody will get round to WSF> implementing it. Let's say we call the opposite of the 'flatnested' WSF> feature the 'nested' feature, then %feature("nested") or %nested will WSF> turn on the nesting that Vladimir has implemented in the target WSF> languages that supporting nesting (Java and C# currently). Hence it will WSF> be akin to the 'nspace' feature, in that only a few languages have WSF> implemented it and it is off by default. So although the defaults are WSF> non-optimal for Java and C#, there is a simple way to turn it on using WSF> the global feature. Sorry, what exactly do we gain from making the defaults suboptimal for Java and C#? I agree that it's not a huge deal if it's just a matter of using %feature("nested") globally to make things work as expected again, but why do the wrong thing by default? WSF> Most importantly, when the 'nested' feature is implemented by a target WSF> language at some point in the future, it will not break user's wrappers WSF> as it will require explicitly turning on. I think it would make more sense to require explicitly enabling "flatnested" feature, at least for the languages which support real nested classes at all, and continue ignoring them, as pre-3.0 versions did, for backwards compatibility. Like this, when the real "nested" feature is implemented, it wouldn't break any existing wrappers and could be enabled by default for the other languages too, just as it should already be in 3.0 for Java and C# IMHO. WSF> Any stong objections? I don't think mine counts as strong, but it probably should count as an objection. Regards, VZ |