Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » HELPER: Value grouping to ValueArray
Re: HELPER: Value grouping to ValueArray [message #29826 is a reply to message #29825] Sat, 20 November 2010 19:48 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
What about doing this as constructor overloads? Perhaps starting with 2 parameters to avoid copy variant. Or is it too ambiguous?


as far as got to know the ValueArray code, it does adding values by adding it to internal Vector<Value> anyway.
doing it like in the example above already provides the prepared Vector<Value> to pick, so no copy is done. and it saves the ValueArray interface from growing Smile and remains optional usage.

ambiguity maybe could be a side effect some day in other occassions.. i consider ValueArray(_pick Vector<Value>&) flexible enough if you ask me..

it'd also be possible to leave it like it is now and simply do
Value v = ValueArray(Vector<Value>() << 123 << "Hallo" << 34.9);

its not so nice, but neither generates extra code in Upp base to manage Smile

it was just an idea, to increase readability
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PROPOSAL: linear Scaler helper for different min/max domains
Next Topic: Date limited to 2020 and 2015 does not work ?!?
Goto Forum:
  


Current Time: Mon Apr 28 09:07:59 CEST 2025

Total time taken to generate the page: 0.00946 seconds