Home » U++ Library support » U++ Core » Value: why not float support?
Re: Value: why not float support? [message #30402 is a reply to message #30392] |
Tue, 28 December 2010 13:47   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
naah...that was not what i meant 
anyway, permit another question..
why does Value support int? int64 would do it just the same?
why bool? it's actually an int or even int64 for the cpu / compiler.
so breaking this down, the only meaningfull types would be double and int64, as representing the superset of possible types. which i suppose would be the perfect case.. but in terms of handling it'd be a nightmare, a lot of (int)myval, (bool)myval or myval = (double)myfloat and (int64)myint. why not have Value do all this mess?
if the user decides to represent it's data as double, or as float, or int or int64 he also decides on the resolution he needs, well knowing that this might 'implicitly' reduce some resolution, if coming from double precision i.e..
sorry to bother you with all that. i clearly can understand that you are not well with the thought of extending / breaking a working code just for the benefit of some marginal usecases. i'd do the same. mi point is, that i see a lot more potential in usage of Value than is currently possible. this is genious class that eases handling with types a LOT. but it needs some leverage of burdens.
just to demonstrate: i had to program a typed interface for a gui in our enterprise, and, just because i was 'scared' of Value, knowing it was not able to easy deal with float (because this is what our communication protocol uses the most) left it out to be used. instead, i took a templated approach, inveneted a custom database for objects, etc. etc.. now looking back, having better understood Value and having float support, i'd save me a LOOOT af work and headache.
generally, i'd recommend to enrich Value to support all types which differ in sizeof(), these are the signed variants.. this makes Value really attractive in usage in communication protocols.
bool
char
short
int
int64
float
double
|
|
|
 |
|
Value: why not float support?
By: kohait00 on Mon, 30 August 2010 10:54
|
 |
|
Re: Value: why not float support?
By: mirek on Tue, 31 August 2010 15:49
|
 |
|
Re: Value: why not float support?
By: kohait00 on Tue, 31 August 2010 16:11
|
 |
|
Re: Value: why not float support?
By: mirek on Tue, 31 August 2010 18:49
|
 |
|
Re: Value: why not float support?
By: kohait00 on Tue, 31 August 2010 22:02
|
 |
|
Re: Value: why not float support?
By: gprentice on Wed, 01 September 2010 13:52
|
 |
|
Re: Value: why not float support?
By: kohait00 on Wed, 01 September 2010 16:13
|
 |
|
Re: Value: why not float support?
By: mirek on Thu, 02 September 2010 09:40
|
 |
|
Re: Value: why not float support?
By: kohait00 on Thu, 02 September 2010 11:24
|
 |
|
Re: Value: why not float support?
By: mirek on Mon, 06 September 2010 10:40
|
 |
|
Re: Value: why not float support?
By: kohait00 on Mon, 06 September 2010 11:54
|
 |
|
Re: Value: why not float support?
By: kohait00 on Mon, 13 December 2010 15:47
|
 |
|
Re: Value: why not float support?
By: mirek on Wed, 15 December 2010 16:15
|
 |
|
Re: Value: why not float support?
By: kohait00 on Wed, 15 December 2010 16:41
|
 |
|
Re: Value: why not float support?
By: rylek on Mon, 20 December 2010 23:08
|
 |
|
Re: Value: why not float support?
By: kohait00 on Tue, 21 December 2010 08:20
|
 |
|
Re: Value: why not float support?
By: mirek on Fri, 24 December 2010 12:39
|
 |
|
Re: Value: why not float support?
By: kohait00 on Fri, 24 December 2010 13:55
|
 |
|
Re: Value: why not float support?
By: mirek on Sat, 25 December 2010 10:48
|
 |
|
Re: Value: why not float support?
By: kohait00 on Sun, 26 December 2010 11:28
|
 |
|
Re: Value: why not float support?
By: mirek on Mon, 27 December 2010 13:20
|
 |
|
Re: Value: why not float support?
By: kohait00 on Mon, 27 December 2010 14:28
|
 |
|
Re: Value: why not float support?
By: mirek on Mon, 27 December 2010 14:44
|
 |
|
Re: Value: why not float support?
By: kohait00 on Tue, 28 December 2010 13:47
|
 |
|
Re: Value: why not float support?
By: kohait00 on Mon, 07 March 2011 14:31
|
 |
|
Re: Value: why not float support?
By: mirek on Mon, 07 March 2011 23:04
|
 |
|
Re: Value: why not float support?
By: kohait00 on Tue, 08 March 2011 08:33
|
Goto Forum:
Current Time: Mon Aug 25 18:04:43 CEST 2025
Total time taken to generate the page: 0.06795 seconds
|