Re: [Vala] nullable generic types
- From: Adam Dingle <adam yorba org>
- To: Julian Andres Klode <jak jak-linux org>
- Cc: all yorba org, vala-list gnome org
- Subject: Re: [Vala] nullable generic types
- Date: Tue, 06 Apr 2010 07:16:54 -0700
Jürg resolved it as NOTABUG:
https://bugzilla.gnome.org/show_bug.cgi?id=605490
Aha - I hadn't seen that bug, in which Jürg wrote that dropping the
nullable modifier is intentional for now.
It seems, then, that for any generic type T, writing 'T?' is always
exactly equivalent to writing 'T' in a Vala program. For example, I can
write either
T foo (T x, T y) { ... }
or
T? foo (T? x, T? y) { ... }
and the compiler will accept the same block contents and generate the
same code. Furthermore, if I write 'T?' then it will become 'T' in the
.vapi file.
Given this, I suggest that the compiler should simply reject 'T?' as an
illegal type. The '?' is ignored anyway, and I think that having 'T?'
in source code but 'T' in .vapi files will only cause confusion.
PS. Please folllow RFC 1855, especially the following excerpt:
"Be brief without being overly terse. When replying to a message,
OK - will do. :)
adam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]