5 ms·
The submitted title is missing the salient keyword "finally" that motivates the blog post. The actual subtitle Raymond Chen wrote is: "C++ says “We have try…f
by jasode 9mo ago
The submitted title is missing the salient keyword "finally" that motivates the blog post. The actual subtitle Raymond Chen wrote is: "C++ says “We have try…finally at home.”"
It's a snowclone based on the meme, "Mom, can we get <X>? No, we have <X> at home." : https://www.google.com/search?q=%22we+have+x+at+home%22+meme https://www.google.com/search?q=%22we+have+x+at+home%22+meme
In other words, Raymond is saying... "We already have Java feature of 'finally' at home in the C++ refrigerator and it's called 'destructor'"
To continue the meme analogy, the kid's idea of <X> doesn't match mom's idea of <X> and disagrees that they're equivalent. E.g. "Mom, can we order pizza? No, we have leftover casserole in the fridge."
So some kids would complain that C++ destructors RAII philosophy require creating a whole "class X{public:~X()}" which is sometimes inconvenient so it doesn't exactly equal "finally".
- thombles 9mo agoHN has some heuristics to reduce hyperbole in submissions which occasionally backfire amusingly.
- pjmlp 9mo agoYou have a few minutes to change the title after the submission, I do it all the time.
- tux3 9mo agoIt's rare to see the mangling heuristics improve a title these days. There was a specific type of clickbait title that was overused at the time, so a rule was created. And now that the original problem has passed, we're stuck with it.
- mort96 9mo agoYeah it's a huge mistake IMO. I see it fucking up titles so frequently, and it flies in the face of the "do not editorialise titles" rule: [...] please use the original title, unless it is misleading or linkbait; don't editorialize. It is much worse, I think, to regularly drastically change the meaning of a title automatically until a moderator happens to notice to change it back, than to allow the occasional somewhat exaggerated original post title. As it stands, the HN title suggests that Raymond thinks the C++ 'try' keyword is a poor imitation of some other language's 'try'. In reality, the post is about a way to mimic Java's 'finally' in C++, which the original title clearly (if humorously) encapsulates. Raymond's words have been misrepresented here for over 4 hours at this point. I do not understand how this is an acceptable trade-off.
- mcny 9mo agoPersonally, I would rather we have a lower bar for killing submissions quickly with maybe five or ten flags and less automated editorializing of titles.
- rramadass 9mo agoYou can always contact hn@ycombinator.com to point out errors of this nature and have it corrected by one of the mods.
- UncleMeat 9mo agoA better approach would be to not so aggressively modify headlines. Relying on somebody to detect the error, email the mods (significant friction), and then hope the mods act (after discussion has already been skewed) is not really a great solution.
- mort96 9mo agoIt has been up with the incorrect title for over 7 hours now. That's most of the Hacker News front-page lifecycle. The system for correcting bad automatic editorialisation clearly isn't working well enough.
- rramadass 9mo agoOh, come on man! These are trivial bugs. Whoever noticed it first should have sent the email to the mods. I did it before i posted my previous comment and i now see that the title has been changed appropriately.
- mort96 9mo ago7. hours.
- rramadass 9mo agoPresumably nobody informed the mods (before i did) and it was very early in the morning in the US (assuming mods are based in the US). That would explain the delay. Anyway, going forward, if anything like this happens again folks should simply shoot an email immediately to the mods and if the topic is really interesting deserving of more discussion they can always request the mods to keep the post on the frontpage for a longer time period via second-chance pool etc. It just takes a minute or two of one's time and hence not worth getting het up over.
- ibobev 9mo agoI intentionally shortened the title because there is a length limit. Perhaps I didn't do it the right way because I was unfamiliar with the mentioned meme. Sorry about that.
- vidarh 9mo agoI'm curious about the actual origin now, given that a quick search shows only vague references or claim it is recent, but this meme is present in Eddie Murphys "Raw" from 1987, so it is at least that old.
- pelorat 9mo agoSounds like a perfect fit for some Deep Research. Edit: A deep research run by Gemini 3.0 Pro says the origin is likely to be stand-up comedy routines between 1983–1987 and particularly mentions Eddie Murphy, and the 1983 socioeconomic precursor "You ain't got no McDonald's money" in Delirious (1983) culminating in the meme from in Raw (1987). So Eddie might very well be the original origin.
- deleted 9mo ago[deleted]
- locknitpicker 9mo ago> So some kids would complain that C++ destructors RAII philosophy require creating a whole "class X{public:~X()}" which is sometimes inconvenient so it doesn't exactly equal "finally". Those figurative kids would be stuck in a mental model where they try to shoehorn their ${LanguageA} idioms onto applications written in ${LanguageB}. As the article says, C++ has destructors since the "C with Classes" days. Complaining that you might need to write a class is specious reasoning because if you have a resource worth managing, you already use RAII to manage it. And RAII is one of the most fundamental and defining features of C++. It all boils down to whether one knows what they are doing, or even bothers to know what they are doing.
- afiori 9mo agoOk, but sometimes you just need a single line in a finally and writing a class is more annoying
- locknitpicker 9mo ago> Ok, but sometimes you just need a single line in a finally and writing a class is more annoying I don't think you understand. If you need to run cleanup code whenever you need to destroy a resource, there is already a special member function designed to handle that: the destructor. Read up on RAII. It somehow you failed to understand RAII and basic resource management, you can still use one-liners. Read up on scope guard. If you are too lazy to learn about RAII and too lazy to implement a basic scope guard, you can use one of the many scope guard implementations around. Even Boost has those. https://www.boost.org/doc/libs/latest/libs/scope/doc/html/scope/scope_guards.html https://www.boost.org/doc/libs/latest/libs/scope/doc/html/sc... So, unless you are lazy and want to keep mindlessly writing Java in ${LANGUAGE} regardless it makes sense or not, there is absolutely no reason at all to use finally in C++.
- AnimalMuppet 9mo agoSlightly more than that: If you need to run cleanup code, whatever needs cleaned up should be a class and do the cleanup in the destructor. Take a file handle, for instance. Don't use open() or fopen() and then try to close it in a finally. Instead, use a file class and let it close itself by going out of scope.
- coliveira 9mo agoThat's why you shouldn't use memes in the titles of technical articles. The intelligibility of your intent is vastly reduced.
- mort96 9mo agoThe title of the blog post is perfectly intelligible. It becomes unintelligible when you remove random words from it.
- otterley 9mo agoIt didn’t make sense to me, either, and I’m a native English speaker. The cultural reference was lost on me.
- afiori 9mo agoThe requirement to avoid any cultural reference is a bit strict
- ModernMech 9mo agoIt still didn't make sense to me with all the words. The way it finally made sense was seeing the formatting is "We have `try...finally` at home".