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++ Library : Other (not classified elsewhere) » Add and AddPick should return reference to added element
Re: Add and AddPick should return reference to added element [message #1691 is a reply to message #1690] Mon, 13 March 2006 21:59 Go to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
hojtsy wrote on Mon, 13 March 2006 15:47

So what about array.Add().ProcessSomething(s) ? Is that trivial for everyone? The reference is returned for convenience so that client code could operate on the newly inserted element. The same would be needed for the other Add methods.


I think there is no ambiguity....

Well, I am not saying that what you propose is a bad idea.... Just during 6 years of current interface I never really felt that this would help.

Maybe it is just that U++ way of coding does not lead to situations where this has any benefit.

Think: you are using Add with parameter variant just for value elements - and you are seldom calling methods for values, much less mutating methods. That is also the source of ambiguity.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linux SDL [BUG?][WORKAROUND]
Next Topic: subclassing LineEdit is ugly
Goto Forum:
  


Current Time: Fri Jul 18 14:27:56 CEST 2025

Total time taken to generate the page: 0.04110 seconds