...

EliRivers

5954

Karma

2010-01-21

Created

Recent Activity

  • If we're chucking in on these, which seems to be the case, also Black Arrow; the UK's nascent space programme which in 1971 put a satellite into orbit (which is small beans now but in 1971 was still a serious achievement) and was then cancelled because the US said they'd give the UK discount pricing on their own launches, and then when it was cancelled the US said "Ha! Suckers! Of course you're not getting a discount!" (accounts of this may vary)

    I think the UK might be the only country that developed, and then fully abandoned, its own capability to launch satellites. Now being slowly recreated, fifty years later.

  • I expect someone will just hand a huge amount of money to some AI snake oil company who will fuck it mightily on their behalf in a "nobody could have seen this coming, we're not at fault" manner.

  • "most bidets starts leaking after 6-12 months."

    Well that just doesn't sound true at all. I would definitely remember if it leaked every year. Do you have any evidence for this? A bidet is pretty basic plumbing, and basic plumbing can go decades without leaking.

    I guess if someone goes out and buys cheap parts that fail fast, and always does that, then you'll get some people whose plumbing fails every six months and everyone else goes years or decades without problems.

  • To be fair, there's a reason for the pattern with init methods you're describing.

    Without prejudice on any other reasons, the most common reason for this pattern I've seen is people thinking in languages that basically don't have constructors, yet writing C++. It's not a good reason.

  • One of the common pitfalls I've seen in my time is someone writing a language they are familiar with in a language that just doesn't fit; trying to apply idioms that flow well with one language to another language where that's just not a good way to achieve the same ends.

    An example I've seen a lot is a C thinker writing C++ classes with an init() function; sure, it works, but the C++ way is to do that in constructors. (All those about to start listing exceptions to that C++ idiom, please save it to the end, thanks!) The C thinker is still thinking about objects as "allocate memory, then set values" rather than the C++ way where allocation and initialisation are wrapped together into a single action (from the programmer's point of view).

    So what are these pitfalls for a C++ thinker when writing Rust? This "phrasebook" is embracing the idea of taking a C++ way of thinking and applying it to Rust, which I'm sure will be fine for many situations, but what are the C++ phrases that are just the wrong way to do things in Rust?

HackerNews