[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Vala] protected classes



On Wed, 2008-04-02 at 20:24 +0200, Ali Sabil wrote:
> On Wed, Apr 2, 2008 at 7:42 PM, Jürg Billeter <j bitron ch> wrote:
> >  How exactly do you use private top-level classes at the moment? Do you
> >  have multiple top-level classes in one source file, some of them private
> >  and you access the private class from the public class?
> >
> Yes that's exactly it.
> 
> >  Wouldn't private inner classes work fine, too, in that case?
> 
> Right, inner private classes should work fine for most cases, I just
> don't really like them (I find it difficult to deal with deep nesting
> code), but that's a matter of taste.

I understand the nesting issue, however, inner private classes make more
sense from a structural point of view. Maybe we could allow something
like that:

public class MyNamespace.MyPublicClass {
    ...
}

private (static) class MyNamespace.MyPublicClass.MyPrivateClass {
   ...
}

I.e. inner classes without nesting issues. Does this make sense?

Jürg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]