Home » U++ Library support » U++ Core » Core: Null handling incoherent?
Core: Null handling incoherent? [message #32255] |
Wed, 04 May 2011 10:46 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
hi all,
i'm wondering why
template <class T> bool IsNull(const T& x) { return x.IsNullInstance(); }
and not
template <class T> bool IsNull(const T& x) { return x.IsNull(); }
is there a reason for it? name clashes??
analogue to upp philosophy it should be latter case, ( Xmlize() { x.Xmlize() } etc.)
some classes define IsNullInstance(), some do IsNull(), it's kinda 'not clean'
(background: i'm tackling Null handling in terms of extension of Value with other types on user side (i.e. float), where the Null handlig is the major problem.)
EDIT:
it's also the point of what Null actually is.. is it only to be seen in context with Value handling? because all classes interacting with Value the classes need to know about Value, but Value.h defines some of the interface handling with the types as well. so it's mixed. (i.e. String.h has template definition of IsNull())..
maybe to think of null handling as kind a independant from Value and define it in Defs.h
template <class T> void SetNull(T& x) { x.SetNull(); }
template <class T> bool IsNull(const T& x) { return x.IsNullInstance(); }
so both, Value.h and all the others are aware of that concept..
this probably would also make sense to move Nuller concept to Defs.h
i'm currently making some changes, just trying to get trhough it properly..
[Updated on: Wed, 04 May 2011 11:22] Report message to a moderator
|
|
|
|
|
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: Sat May 11 13:13:21 CEST 2024
Total time taken to generate the page: 0.01934 seconds
|