Re: [Vala] Heads-up on upcoming non-null support
- From: "Michel Salim" <michel sylvan gmail com>
- To: "Jürg Billeter" <j bitron ch>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Heads-up on upcoming non-null support
- Date: Wed, 9 Apr 2008 16:20:40 -0400
On Tue, Apr 8, 2008 at 1:07 PM, Jürg Billeter <j bitron ch> wrote:
Short example:
public void foo (Bar bar) {
// bar is expected to be non-null
// will be enforced at run-time in future Vala versions
}
public void foo (Bar? bar) {
// bar is allowed to be null
}
Any questions or comments about this?
Presumably a compile-time check is also performed on return values? e.g.
public Bar foo () {
return null;
}
should fail.
What if the nullity of the value cannot be determined at compile time?
Enforce that the return type must have '?' ?
Thanks,
--
Michel Salim
http://hircus.jaiku.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]