Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:I reckon (Score 1) 132

Why would we want to do something the compiler can do? There is no bragging rights to stupidly doing what a compiler can do. I can know exactly the scope of some malloc'd buffer, but so can a wrapped type like a vector. Why would I possibly want to waste time writing and testing/valgrinding to make sure every malloc is freed when the compiler can automatically call the destructor for me?

Because you have information that the compiler doesn't have. Like what's vital code and what's gilding, and how to prioritize based on business needs. You can free up non-critical code allocations early to avoid background gc impacting performance, or re-purpose already allocated memory in critical code to reduce overhead, or a large number of other techniques that are available because you know more than the compiler.

Why do anything that a machine can do? Because in many circumstances you can do it better. Use automation where useful, but when you have knowledge that the automation lacks, use it. Whether you're driving a car, cooking a meal, composing a song, or writing a program, use your special knowledge and skills. If you think a black box can do it better than you can, you're probably right. And ripe for being replaced.

Comment Re:Just what we needed (Score 1) 132

Do you know what I never hear a carpenter saying? "Geez, look at all these tools. I wish I had fewer tools in my toolbox."

Bad analogy. When the carpenter needs to repair something, he doesn't need to line up all the tools used to create it. And someone taking over the work doesn't need to learn the tools the previous carpenter used.

The only fitting part of the analogy is that if the dovetails or tenons have gaps or cause the wood to split, it's probably because the carpenter used power tools and templates instead of more precise hand tools and reading the grain. Too much abstraction and little understanding of the fundamentals truly hurts the end product.

Comment Re:Still no template definition checking :-( (Score 1) 132

Yes. That's the nature of STL concepts. Unlike Haskell typeclasses, it's not enough just to see that there are operations with the right types, because STL concepts are often defined in terms like "this is a valid expression, which returns a value convertible to bool".

Comment Re:Deliberately missing the forest for the trees (Score 1) 297

Oh, I got your point, but here's the thing: the people who live there don't think there are problems. It's not for me, I don't even like visiting my friends who live there, but they don't see the problems the way you or I might. I suppose that makes them... well... not problems, since the people there like the situation and the people who don't like it don't have to live there.

My point, which you clearly missed, is that it is very short-sighted and ignorant to call someone stupid for their preference in living conditions. Perhaps they simply have different priorities than you? I tend to think if it similar to how I wouldn't call someone who prefers Clover brewed coffee stupid for going through that complicated brew process (or paying someone to do it for them) just because I, personally, think it's a complicated waste of time on top of tasting awful. It's what they like and there's no other way to get it.

Is it possible to live better for a fraction of the cost of living in San Francisco? Well, it is certainly possible to live for a fraction of the cost; however, "better" is subjective. you and I may agree that life outside of that particular city is "better", but there are many who do not. Clearly, there are more who believe life is better there than there are places for them to live there. The smart ones figure out how to make it happen.

Comment Re:Sounds overly complicated (Score 2) 132

The key difference between this and interfaces in Java [...]

...is that algebras in Java are single-sorted, whereas in C++ they are trying to be more multi-sorted.

The primary purpose of an algorithm (or a program, for that matter) is to transform data from one form to another form. Simula-style object orientation, as you find in Java (and in the OO part of C++), associates operations with a single type. This is the least-common and least-useful case, because the interesting parts of programs almost always involve more than one type.

One key thing about the C++ concepts proposal that a lot of people miss is that it many templates have more than one argument. So it's not just a single type we're talking about here, but also associating related types.

So it's not just "adding an interface after the fact". (Although that's a useful feature in itself; how many times have you needed to "decorate" a type from a library whose source code you don't own?) It's bringing the concept of a "class" closer to what that word actually means.

Of course, Haskell's typeclasses are even better.

Comment Re:Subject (Score 2) 168

You touch upon the problem why it won't work. It requires rigid regional DRM. And that's not a good long term solution.
There's no doubt in my mind that piracy has increased due to regional DRM, both for DVDs and entertainment software. If you can't get what you want legally while others can, that leads to uprising and war. Even if the war is just one person downloading pirated stuff.

Comment Re:Not so innocent after all (Score 3, Interesting) 124

Where the hell did you get that? Yes, there were people driven by religious zeal and whatnot, but for most of the European nobility the crusades were a chance to conquer a land for themselves, for as second born they had no claim to the land the firstborn got.

If you go down the list of noble participants of the various crusades, you will come up with a handful of landed leaders who wanted to ensure that the new "owners" will swear fealty to them and a huge number of landless nobles who wanted some.

Comment Re:Deliberately missing the forest for the trees (Score 1) 297

they don't insist that their morning lattes come from the same block they live on

Actually, insisting that your morning latte comes from the same block you live on can be very smart, if you do it right. After all, the Keurig in my kitchen on the same block I live on.

Would a drip brew be even smarter? Perhaps, if I were brewing more than one cup at a time. When I need to use enough grounds to brew a full pot just so the water doesn't bypass them, and I'm only interested in a single cup (or maybe two), the Keurig actually comes out ahead, even with the "expensive" K-cups. It's even farther ahead with reusable K-cups, as I need use only one Tbsp of grounds per cup and there is no water waste; my previous 8-cup drip needed 12Tbsp to brew 8 passable cups and water would simply bypass the grounds, resulting in a weak brew if you used less than 6Tbsp, which meant using enough coffee to brew 4 cups at a minimum, even if I only wanted one or two. Rather, it meant using enough coffee to brew 6 cups in my Keurig if I wanted anywhere between 1 and 4 cups, or enough to brew 12 cups in my Keurig if I wanted 8.

But yes, circling back around, leaving my block (let alone my house) to get a latte seems brilliant.

Slashdot Top Deals

"An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup." - H.L. Mencken