Better HN
topnewbestaskshowjobs
Log inSign up

zowch

11 karma · joined Jan 3, 2013 (13y ago) · 7 submissions

Submissions

comment 12y ago · link · parent

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.

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

This is the link, for reference: https://news.ycombinator.com/item?id=6033567

comment 13y ago · link · parent

Pedantic and tangential, but in your example, the statement would still be incorrect, as a revocable right is, by definition...well, alienable.

comment 13y ago · link · parent

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?

comment 13y ago · link · parent

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?