Re: [Vala] protected classes
- From: Jürg Billeter <j bitron ch>
- To: Ali Sabil <ali sabil gmail com>
- Cc: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] protected classes
- Date: Wed, 02 Apr 2008 19:42:00 +0200
On Wed, 2008-04-02 at 19:04 +0200, Ali Sabil wrote:
On Wed, Apr 2, 2008 at 3:23 PM, Juerg Billeter <j bitron ch> wrote:
Ok, I see what you mean now. However, I don't think it makes sense to
distinguish between classes in public header files and classes whose
symbols are exported. All classes that are in public header files should
be exported and all classes that are exported should be in public header
files. So we only need two kinds of top-level classes: public classes (in
public header files and symbols are exported) and internal classes (in
private header files and symbols are not exported). The currently
available 'private' classes don't make sense at all at the top-level, as
there is no way you could ever access them (except when it contains the
main method).
I don't think we should use 'protected' for internal classes, this
conflicts with the 'protected' used for specifying accessibility to
subtypes. 'internal' sounds fine, in my opinion, it's also in line with
C#.
I am not sure, but I currently find the private classes very useful,
and I use them quite often,
what about having public, private and package visibility for the classes ?
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?
Wouldn't private inner classes work fine, too, in that case?
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]