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 » Community » Coffee corner » Pick overloaded by Rvalue?
Re: Pick overloaded by Rvalue? [message #19108 is a reply to message #19104] Wed, 12 November 2008 22:04 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
bytefield wrote on Wed, 12 November 2008 14:37

captainc wrote on Wed, 12 November 2008 21:27


<< represents .Add() method
Upp::Vector<Upp::String> vs;
vs << "Header1" << "Header2" << "Something else" << "and so on...";



Ok, that's fine but think that you have to overload operator << for every container you have. Having initialization as in example specified by cbpporter let you using it with any type possible so we don't have to code for it.


Well, AFAIK, you need to add specific methods as well.

BTW, you can write it even shorter:

Vector<String> vs = Vector<String>() << "Header1" << "Header2" << "Something else" << "and so on...";

As for C++ being evil/good/bad etc... I like C++ because

- there is no other language covering all areas from HW up to highest levels of abstraction

- this is the only language with destructors

- many alternatives lack efficient operator overloading

- templates are hard to learn, but are the most powerful, esp. w.r.t. efficiency

but there are some downsides too

- as it is pretty complex language, it is hard to get compiler right (fortunately, this mostly seems to be resolved now). Also, with preprocessor, it is hard to get development tools like Intellisense working well (but we have managed, right? Smile

- dynamic library APIs are difficult to maintain if you wish to use the real power of language

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Looking for someone to convert a ulimate++ project to Microsoft Visual C++ project
Next Topic: Fantastic work!!
Goto Forum:
  


Current Time: Sun May 12 01:54:17 CEST 2024

Total time taken to generate the page: 0.04581 seconds