ooc-dev team mailing list archive
-
ooc-dev team
-
Mailing list archive
-
Message #00093
Re: New ORC draft - Properties
So, a bit of news on this front. As far as I know, Friedrich Weber has been
working on adding properties to rock (the parsing seems to be already done,
now only the AST manipulation remains).
Should we wait for it to be fully implemented in rock before accepting this
ORC ? Is there still something anyone want to suggest?
Amos Wenger (nddrylliog)
On Thu, Apr 1, 2010 at 8:35 AM, Zachary Brown <zac@xxxxxxxxxxxx> wrote:
> I would agree on that point. If you make properties and their
> setter/getters too flexible, we'll end up with some sort of nasty beast.
> Something akin to various features of C++ :).
>
> I like the properties idea, but in a very simple form. Also the C API
> should remain consistent so as long as that can be maintained with a healthy
> amount of sanity, I'm all for it.
>
> -Zac
>
> On Mar 31, 2010, at 2:30 PM, Scott Olson wrote:
>
> > There is a problem with the current implementation and doing that, Josh.
> As my ORC describes, the argument of the setter's type is checked against
> the type of the property. It would only be able to accept a tuple if the
> properties type was a tuple, and that just fits in with all the other
> collections I mentioned. Now, there was some discussion about having
> multiple setters with different types for a single property, but for now, I
> think nddrylliog wants to keep it simple, which seems like a good idea.
> >
> > On Wed, 31 Mar 2010, Josh Roesslein wrote:
> >
> >> Also once we have tuples, multiple setter values would also be possible.
> >> On Wed, Mar 31, 2010 at 8:31 AM, Scott Olson <scott@xxxxxxxxxxxxxxx>
> wrote:
> >> If you want to set multiple values in one property, I think you
> should be using an array or a vector class or any other collection class.
> >>
> >> numbers: ArrayList<Int> {
> >> set(list) {
> >> // ...
> >> }
> >> get
> >> }
> >>
> >> someclass numbers = [1, 2]
> >>
> >> And then there are no extra changes needed.
> >> On Tue, 30 Mar 2010, Tres Walsh wrote:
> >>
> >> Looks pretty good.
> >>
> >> I noticed that in all of your examples you use set(value)
> >>
> >> would it be make any sense to allow setters to take multiple
> arguments?
> >>
> >> for instance
> >>
> >> set(value1, value2) { this number = value1 ^ value2 }
> >> someclass number = 1, 2
> >>
> >> Please note the above example is poor at best. And I can't think of
> >> any cases where this would happen. I'm just trying to generate
> >> discussion =)
> >>
> >> On Tue, Mar 30, 2010 at 9:50 PM, Scott Olson <
> scott@xxxxxxxxxxxxxxx> wrote:
> >> I have created a draft ORC for the new Property syntax that
> was much
> >> discussed in the IRC channel. I hope it is informative and
> exlempatory of
> >> what an ORC should look like. ^.^
> >>
> >> Link:
> http://github.com/tsion/middleearth/blob/master/drafts/Properties.md
> >>
> >> - Scott Olson
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~ooc-dev
> >> Post to : ooc-dev@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~ooc-dev
> >> More help : https://help.launchpad.net/ListHelp
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~ooc-dev
> >> Post to : ooc-dev@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~ooc-dev
> >> More help : https://help.launchpad.net/ListHelp
> > _______________________________________________
> > Mailing list: https://launchpad.net/~ooc-dev
> > Post to : ooc-dev@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~ooc-dev
> > More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ooc-dev
> Post to : ooc-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ooc-dev
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References