Re: [Vala] Converting nullable to non-nullable types



On Fri, 2010-02-26 at 15:06 +0100, Jiří Zárevúcky wrote:
Sam Wilson píše v Čt 25. 02. 2010 v 21:43 -0500:
Looks great, but I can't get it to compile with experimental non null
since the ?? operator is returning an 'int?'


That's a bug. ?? should have the second operand's type.


Okay, good, I thought I might have been going crazy.  Has it been
reported yet?

IMHO, as nice as this solution is, it seems a bit hackish for a language
that claims to support non-null types.

Remember that non-null checking is experimental. That means it's not
supposed to be complete and bug-free at this point.

I don't mean the checking for null, which I expect to be buggy.
I am referring to the language itself, which seems to have very few
constructs for dealing with NN types.

  Overall, Vala provides very few
features that make N.N. types more attractive compared to regular types
and personally I find them a pain to work with


Nobody's forcing you. It's an experimental feature you need to
explicitly turn on. You have chosen to do so, you must bear the
consequences - bugzilla awaits you :-P

I am not familiar enough to know when something is a bug, or when it is
a "feature", hence why I am here :)

I simply think that for NN types to become widely used, they should be
convenient. Having to define a method in every project that converts
between a nullable type and a NN type is slightly repetitive, and not
really convenient, hence why I proposed a new operator.

Attachment: smime.p7s
Description: S/MIME cryptographic signature



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