On Fri, 2008-12-19 at 20:49 -0500, Jamie McCracken wrote:
> On Sat, 2008-12-20 at 02:19 +0100, Hans Vercammen wrote:
> > On Fri, 2008-12-19 at 12:10 +0100, Jürg Billeter wrote:
> > > 
> > >       * `(owned)' cast replaces `#' reference transfer expression
> > > 
> > > Even less used, equally unintuitive. Example of new syntax:
> > > 
> > > string foo = (owned) bar;
> > 
> > I don't have a strong opinion on this since I don't really need it, but
> > using a cast expression feels a bit wrong. Not sure if we want to keep
> > the option open of having operator overloading, but what about something
> > like:
> > 
> > string foo <= bar;
> > or
> > string foo << bar;
> 
>  <= and << are already operators in use and would be confusing but i do
> agree the use of cast syntax here is odd

Vala already has this nice type system we can (ab)use to put the
operators in the right context. Nevertheless, I agree the syntax of
operators isn't always clear.

> I would suggest something thats not a cast but still clear:
> 
> string foo owns bar;
> 
> or
> 
> string foo = owned bar;

Would go for the first one as the second one doesn't offer much benefit
over the current implementation.

Hans

_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to