Re: [Vala] Libgee problem
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Xavier Bestel <xavier bestel free fr>
- Cc: Nicolas <c r n a wanadoo fr>, vala-list gnome org
- Subject: Re: [Vala] Libgee problem
- Date: Thu, 10 Dec 2009 19:53:54 +0100
Hi,
2009/12/10 Xavier Bestel <xavier bestel free fr>:
On Wed, 2009-12-09 at 23:13 +0100, Jiří Zárevúcky wrote:
In order to make a value type nullable, you need to convert it to a
reference type. That's what you call boxing. So nullable and "boxed"
types are essentially the same (in C# anyway I think). Though I believe
Vala doesn't actually treat nullable types as reference types, because
there is no way to track reference count (someone correct me if I'm
mistaken). A nullable variable is implemented as a simple pointer here.
I'm not sure about the jargon, but I think "a pointer with memory
management even if without reference counting" is actually a reference
type. (like most of the compact classes)
So that means you can't have boxed non-nullable types ?
Yes, or at least it's a very hidden feature that needs to be documented ;-p
And that means a "double" has a different behavior than a "double?" ?
Because of automatic boxing/unboxing, you won't notice the difference
often, but yes, it could be.
Non-obvious.
=> needs to be documented as part of the documentation hackaton
Peace,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]