ooc-dev team mailing list archive
-
ooc-dev team
-
Mailing list archive
-
Message #00008
Re: properties syntax
Glad that you like it =) Before carving it in the stone, I'll wait for the
reactions of other people on the mailing list.
I'll just profit of the occasion to edict a fundamental rule or guiding
principle in designing ooc syntax: it should mostly be clear at first read.
At least, it should be guessable even without the language reference. The
easiest way is to spell everything as clearly as possible (as in the
getter/setter syntax suggestion, for the implement/override keywords and the
func keyword).
Amos
2009/6/30 Vincent R. <forumer@xxxxxxxxxxxxxxx>
>
> > So I was thinking of something like that:
> >
> > class Sumthin {
> >
> > Int secret;
> >
> > setter(secret) {
> > // We obviously have one parameter of type secret. But what's its
> name?
> > }
> >
> > getter(secret) findTheSecretName {
> > // Custom-name setter: information hiding..
> > }
> >
> > }
> >
> > Of course it's far from perfect, but what do you think ? Point 1) of my
> > requirements is only half filled by this suggestion, but it's the most
> > obvious that I can see.
> >
> I really like it a lot!
>
>
References