Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Ahhhh, C++ (Score 1) 757

I don't know why you want to modify strings in-place. Seems like you are complaining that it is not C-like. It would be much better if values were returned, for instance your "mystring.replace("from","to")" would not change mystring, but instead return a new string with the replacement done.

One of the biggest mistakes in std::string is that operator[] returns a non-const reference. This is so all those people raised on Visual Basic could capitalize by doing a[0]=toupper(a[0]). It also means that efficient copying of strings by using reference counts is impossible.

Making it a template just because a bunch of loonines thought that you could not do Unicode unless you made all the characters the same size was another mistake. Not only is the code unreadable and impossible to optimize, those idiots ended up with UTF-16 which is variable sized anyway. Duh.

Comment Re:Write-only code. (Score 4, Informative) 757

The sample code will copy a and b twice, once to put them in the lambda closure, and then to pass them as arguments to do_something. Some may consider this wasteful (the easiest fix is to modify do_something to take the values as const references).

This is the general problem with C++, in that the shortest code is often the slowest. Adding const references to the declaration of do_something would remove the useless extra copy. The slowness is visible in C, where you would probably allocate a structure containing the copy of a and b, and have pthread_create call a function that copies them to the arguments to do_something and calls it, then deletes the temporary structure. This is equivalent to what the C++ compiles into but all the inefficiency is visible. This is the primary complaint about C++ verses C.

PS: I use C++ all the time and prefer it over C. But you do require a good knowledge of what it turns into, often stated in a pseudo-C, to figure out how and why things work and why slight variations (try using [&] instead of [=] in your lambda!) break in horrific ways.

Comment Re:Anybody remember framebuffer madness? (Score 1) 166

The acceleration is now accessible by the client program as it draws into it's own frame buffer. On modern systems the client program can use the GPU as a resource to compute it's own results.

Wayland mostly is providing a way of telling a central service how to combine the client's frame buffer with all the other clients into the image put on the screen.

Comment Re:Metered access, here we come! (Score 1) 550

And exactly why is "metered access" bad? You talked a lot about it but nowhere explained why it is bad, you just seemed to have made an assumption that everybody will think it is bad.

It is pretty obvious from other sales of bandwidth that the actual solution will be a fixed price for up to a threshold which exceeds what most people use, and metering after that. I think that would be an excellent way to charge for internet access.

It would also put some pressure on bloated web sites and ads if people realized they may actually be paying more to download it all.

Comment Re:How do I buy a laptop without preloaded crap? (Score 1) 266

Assuming you want Windows (and not Apple or Linux or BSD or any of a bunch of other suggestions people will make)

From previous statements it sounds like buying the much more expensive "business model" will get this. You may have to do a bulk purchase of dozens of them.

Another suggestion was to buy a system at a Microsoft store. They do have an interest in making Windows not suck.

Slashdot Top Deals

After an instrument has been assembled, extra components will be found on the bench.

Working...