Re: [Vala] Ownership syntax changes

I really like a [owned] like syntax.

It is clear that a [...] expression, refers to Vala code generation
special meaning.

[foo owns bar]
string foo = bar;

or like that:

some_method (42, [owned] bar);

2008/12/20 Xavier Bestel <xavier bestel free fr>:
Le vendredi 19 décembre 2008 à 12:10 +0100, Jürg Billeter a écrit :
I just committed some ownership syntax changes to trunk. The old syntax
will continue to be supported but is planned to be deprecated after the
release of Vala 0.5.4.

      * `owned' type modifier replaces `#' type modifier

This is not often used, but `#' was very unintuitive as a type modifier,
and I therefore decided to replace it by the hopefully better
understandable `owned' modifier. Example of new syntax:

public void foo (owned string bar) {

I like the idea, but the word "owned" doesn't really tells by who it's
owned (caller or callee). How about something like "callers" or
"transfer" ?

Vala-list mailing list
Vala-list gnome org

Clément DAVID

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