News for hackers. Stuff that matters.

zowch

Re:Did you ever wonder why December has 31 days? (1997) on Tuesday April 15, 2014 @10:47AM (#7592088)
It's also worth noting that 'winter' used to be monthless in the Roman calendar, so there were 10 months, ending in December (so all of the number names make sense) and then a big blob of 'winter' before the new year started.
Re:Bjarne Stroustrup – The Essence of C++ [video] on Tuesday September 17, 2013 @08:49AM (#6398924)
As somebody who attended this conference, and hadn't had much exposure to C++11 features outside of 'auto', my personal biggest takeaway from almost every talk was this: Stop passing your sink variables as const refs.

That is to say if you have a constructor:

  MyClass::MyClass(const std::string& s) : m_s(s) {}
That you call like:

  std::string s = "Some string";
  MyClass c(s);
You're hamstringing the compiler into always copying that string instead of being able to use the new move semantics, because it can't mess with the guts of a const reference. Instead, do the previously unspeakable evil of passing by value and then moving, e.g.

  MyClass::MyClass(std::string s) : m_s(std::move(s)) {}
This lets the compiler know that if string has a move constructor, and is an rvalue, it can just move the guts into place instead of performing the copy, since the variable is 'sunk' into the new location. Huge wins all around.
Re:Callbacks as our Generation's Goto Statement on Thursday August 15, 2013 @10:24PM (#6221877)
I'm confused as to why you think the code presented in the blog post isn't an example of 'the same functionality implemented some other way'. The await code is almost undeniably more straightforward and the exceptional cases more obvious to handle.

He also doesn't seem to be making a weird logical leap the way you claim he is. He's not really using an analogy. He's saying callbacks are bad the same way goto is bad, in that they make the logical structure of a program's execution non-obvious, particularly over time and when being modified.

Pedantic and tangential, but in your example, the statement would still be incorrect, as a revocable right is, by definition...well, alienable.
My question is: Once the truck is stopped in front of the sign, presumably with traffic backed up behind it...how do they get it out?
Not really the case here because the article specifically calls out what happened, but it can't really be the case that the name of the blog or site should play NO role in determining defamation, right?

If I run a blog called "Murderer Watch: Keeping an Eye on Murderers and Things" and I post "Bob Jones is 34 and lives in Atlanta, GA," that can't be totally okay just because those are all factual statements, right?