Forgot your password?
typodupeerror

Comment: Re:The Compiler Knows... (Score 2) 102

by mfwitten (#47713871) Attached to: Interviews: Bjarne Stroustrup Answers Your Questions

returning anything other than an iterator from cbegin() is a gigantic misdesign

That's precisely the point, now isn't it...

You are begging the question; you are assuming the contract; you are programming by [implicit] convention—that which plagues dynamic typing.

That is to say, such informal programming tends to be practical in these cases, but don't confuse that practicality with correctness.

Comment: The Compiler Knows... (Score 0) 102

by mfwitten (#47712655) Attached to: Interviews: Bjarne Stroustrup Answers Your Questions

auto... the compiler knows the type of MemVec.cbegin() so why should I need to repeat it?

You're not repeating it; rather, you're specifying it.

Specifying the type is establishing a contract for the following code. This can be very worthwhile.

Note how the scope of cit is now limited to its area of use.

Of course, you could have achieved the same by declaring the variable inside the for-loop; keep things looking simple via a local typedef outside the for-loop:

typedef std::vector::const_iterator CIT;
for (CIT cit = MemVec.cbegin(); cit != v.end(); ++cit) {
        if (LookForPatterm(*cit))
                return true;
}
return false;

Comment: Protecting the Weak from the Strong (Score 1, Insightful) 224

by mfwitten (#47222909) Attached to: Interviews: Bruce Perens Answers Your Questions

Bruce, there's a reason why the gun is called The Great Equalizer.

Indeed, in the grand scheme, you are suggesting that we take guns out of the hands of the individual, and put them solely in the hands of the State; that sounds like a transfer of power from the Weak to the Strong...

Comment: Re:NASA Proposes "Water World" Theory For Origin o (Score 5, Interesting) 115

by mfwitten (#46784675) Attached to: NASA Proposes "Water World" Theory For Origin of Life

Carl Sagan, in Cosmos:

If the general picture, however, of a Big Bang followed by an expanding universe is correct, what happened before that? Was the universe devoid of all matter, and then the matter suddenly, somehow created? How did that happen?

In many cultures, the customary answer is that a "god" or "gods" created the universe out of nothing. But, if we wish to pursue this question courageously, we must of course ask the next question: Where did God come from?

If we decide that this is an unanswerable question, then why not save a step, and conclude that the origin of the universe is an unanswerable question? Or, if we say that God always existed, why not save a step and conclude that the universe always existed? There's no need for a creation—it was always here.

These are not easy questions; cosmology brings us face to face with the deepest mysteries, with the questions that were once treated only in religion and myth.

Comment: Re:It's alive (Score 5, Interesting) 115

by mfwitten (#46784611) Attached to: NASA Proposes "Water World" Theory For Origin of Life

inanimate matter

What does ‘inanimate’ mean? The problem is that people are always making this bizarre differentiation between ‘animate’ and ‘inanimate’, when really there is just matter interacting with matter; some sets of interactions are more complex and organized (or, shall we say, repetitive and sustained) than other sets of interactions. Indeed, sometimes that complexity and organization is so great that we call it ‘life’ and even ‘intelligent life’, but it’s all one and the same:

Matter interacting with matter.

When you eat some metal such as calcium, that calcium may become incorporated in your bones. Is that calcium all of a sudden ‘animated’ and ‘living’? Is the water that you drink somehow ‘animated’ because it flows through your brain cells?

A child is a continuation of that complex interaction between matter that we call the parent.

There's no such thing as a free lunch. -- Milton Friendman

Working...