Home » U++ Library support » U++ Core » Core: Null handling incoherent?
Re: Core: Null handling incoherent? [message #32256 is a reply to message #32255] |
Wed, 04 May 2011 11:39   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
attached is a patch for discussion. the IsNullInstance naming issue is not adressed yet.
benefits:
* more clear coherent interface because IsNullInstance, SetNull are obligatory
* users can use RichValue<> as container for even own intrinsic types like float.., specifying themselves the null handling.
(but float f = Null; still wont work, since it has no converter, but SetNull<float>() can, which is a nice price to pay.
* specifying AsString<T> they can use the Value::ToString for it as well, i.e AsString<float> is already specified..
i'd have considered to have
template <class T> void SetNull(T& x) { x = Null; }
to make SetNull method optional, but Null is kind a wired with Value, which, at level of Defs.h isn't known yet..
-
Attachment: patch0.patch
(Size: 5.77KB, Downloaded 229 times)
|
|
|
 |
|
Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Fri, 06 May 2011 09:55
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Fri, 06 May 2011 13:06
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Thu, 07 July 2011 10:29
|
 |
|
Re: Core: Null handling incoherent?
|
 |
|
Re: Core: Null handling incoherent?
By: kohait00 on Tue, 13 September 2011 18:08
|
 |
|
Re: Core: Null handling incoherent?
By: cbpporter on Wed, 14 September 2011 09:46
|
 |
|
Re: Core: Null handling incoherent?
By: kohait00 on Wed, 14 September 2011 12:46
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Fri, 06 May 2011 09:52
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Thu, 15 September 2011 12:57
|
 |
|
Re: Core: Null handling incoherent?
By: kohait00 on Thu, 15 September 2011 14:29
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Thu, 15 September 2011 15:34
|
 |
|
Re: Core: Null handling incoherent?
By: kohait00 on Thu, 15 September 2011 16:30
|
 |
|
Re: Core: Null handling incoherent?
By: mirek on Fri, 16 September 2011 10:26
|
 |
|
Re: Core: Null handling incoherent?
By: kohait00 on Fri, 16 September 2011 15:26
|
Goto Forum:
Current Time: Sun Jul 06 01:53:08 CEST 2025
Total time taken to generate the page: 0.03514 seconds
|