<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: dataflow</title><link>https://news.ycombinator.com/user?id=dataflow</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Mon, 15 Jun 2026 10:53:42 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=dataflow" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>>> How exactly have you seen people use exceptions to "report errors" that is not for the purpose of indicating that "a contract cannot be fulfilled"?<p>> Reporting normal errors to the caller, as opposed to exceptional errors. The distinction between normal errors and exceptional errors is kind of nebulous, but it boils down to normal errors being those that the immediate caller would be interested in, and everything else is exceptional.<p>...<p>> So to answer your question, exceptions are misused when they communicate relevant errors within the same level of abstraction, such as an open() function throwing a FileNotFoundException.<p>I think your thoughts feel a little bit jumbled here, possibly because you're oversimplifying things too much. Whether a caller would be interested in an exception doesn't really determine whether it should be an exception or an error code. For example, std::regex_error and std::format_error are very much of interest to the callers of the APIs that throw them (e.g., because the patterns user-provided and the callers expect potential failures) but that doesn't mean they shouldn't be exceptions. Or, for example, the only entity ever really interested in an std::out_of_range exception is the caller (say, catching it around a call like std::accumulate(i, j, [&](const auto& key) { return container.at(key); })).<p>You're right that those things all <i>matter</i> in a lot of cases, but the line isn't really drawn like that. IMO, the truth is that whether an exception should be raised vs. an error returned is really not so easy to pin down to a single factor. The things you mentioned matter, but so do run-time, compile-time, and development-time costs. The reason FileNotFoundException is better left as an error vs. an exception isn't so much that it's an expected error condition (in fact, some callers might expect it and others not), but because of the performance characteristics callers generally expect. You don't want disproportionate performance impact to those who need to open potentially non-existent files. If C++ exceptions were as cheap to throw as to avoid, then that would tip the balance significantly.</p>
]]></description><pubDate>Mon, 15 Jun 2026 04:00:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=48536433</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48536433</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48536433</guid></item><item><title><![CDATA[New comment by dataflow in "The rich aren't your role models"]]></title><description><![CDATA[
<p>Mostly off-topic, but I've wondered, is there a measure of wealth that involves first liquidating everything? And what is that for Musk? I don't find it meaningful to say someone has a net worth of $X if they can't actually liquidate their assets and pay off their liabilities to produce $X.</p>
]]></description><pubDate>Mon, 15 Jun 2026 01:29:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=48535394</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48535394</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48535394</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>> Functions aborting is not something I’ve ever really had to think about.<p>There are certainly a lot of programs for which it matters a whole lot. In a lot of applications you absolutely don't want your program to crash. I'm not even talking about rocket launching or pacemakers or HFT here... I just mean something as simple as a web server or job server. It's the difference between taking down the server (say, getting DoS'd) vs. not.<p>> So here’s the thing. I’ve been a professional C++ programmer for 20 years. Not once have I ever worked in a codebase that used exceptions. It’s fine.<p>I work on codebases without exceptions too; it's not just you. "It's fine" in the same sense that working with a messy desk or floor "is fine". One certainly can live with it -- especially when there's no better option available -- but the clutter gets in the way, distracts you, and sometimes leaves you with a little papercut.<p>> Occasionally I use a thirdparty library that does use exceptions and it’s bloody awful.<p>You're not wrong -- this can certainly happen -- but I think you've misidentified the problems. There are other reasons for this than what you've listed in [1] or that I have the energy to fully expand on here, but the biggest one is probably the fact that you're getting the worst of both worlds by the mere virtue of mixing them. Nobody claimed that <i>mixing</i> code that uses exceptions with code that assumes they're disabled would lead to a good outcome. It neither lets you simplify the problem by assuming exceptions will work like they're supposed to, nor does it let you simplify the problem by assuming exceptions are nonexistent. It's like putting cars and bicycles on the same sections of the road all over the town. It's going to lead to more crashes than if you had just stuck with one or the other, and that's not because cars or bikes inherently suck.<p>[1] <a href="https://news.ycombinator.com/item?id=48522500">https://news.ycombinator.com/item?id=48522500</a></p>
]]></description><pubDate>Sun, 14 Jun 2026 07:33:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=48525010</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48525010</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48525010</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>Okay, but if I may offer a suggestion: in the future, I would probably phrase what you said differently. I think it caused you trouble here not just with me but with other readers. Instead of "when the function cannot fulfill its contract", I would talk about "when returning would not fulfill a function's contract."<p>There are actually two reasons for this, not one:<p>- It violates standard terminology. The notion of a contract/postcondition/etc. is not specific to C++ or the particular implementation's mechanisms for exiting a function. It simply means a condition that must hold true after the execution of some piece of code. [1] The <i>intent</i> of this definition is to allow program composition: it enables one to reason about the greater program in terms of the sub-parts. Defining it to be anything else just throws people off, and rather misses the point and utility of the term.<p>- "Cannot" is actually too strong. A function might, in fact, be able to fulfill its contract, but still choose not to. An easy example is something like a constraint solver (SAT, chess, simulator, constexpr evaluator, or whatever). It's <i>guaranteed</i> to be able to find the solution eventually if it keeps going, but that's probably not always a good idea.<p>Now, going back to what you wrote here:<p>> Exceptions aren't meant to report errors, just in general. That's a misuse of them. Exceptions are meant to be thrown when a contract cannot be fulfilled.<p>I'm still not entirely sure I see what you mean by "report errors". How exactly have you seen people use exceptions to "report errors" that is <i>not</i> for the purpose of indicating that "a contract cannot be fulfilled"? The description makes it sound like using exceptions for the purpose of logging, but that would seem like a strawman... I have never seen anyone write throw instead of log. What are you referring to?<p>[1] <a href="https://en.wikipedia.org/wiki/Postcondition" rel="nofollow">https://en.wikipedia.org/wiki/Postcondition</a></p>
]]></description><pubDate>Sun, 14 Jun 2026 06:32:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=48524733</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48524733</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48524733</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>> Saying throw an exception and bubble up to main provides just about zero value. Might as well just call std::abort. Which is also something I would never do.<p>I'm sorry but this is where you're clearly wrong. The whole point is unwinding <i>doesn't</i> have to necessarily happen all the way to main(); there is a ton of value in doing this, and it is not at all equivalent to aborting. It lets someone in the call chain do something other than abort, or clean up stuff that they otherwise might not have a chance to. Like logging an error, telling the client there was an internal error, dumping additional information that wouldn't be useful in the successful case, and/or moving on to another task. All gracefully, without any intermediate functions having to care (aside from providing basic exception safety), and without having to throw your hands up and give up. Aborting without being asked is rather presumptuous and robs your callers of all opportunities to do <i>anything</i> about the problem you encountered.<p>People do this stuff and find it useful... you're effectively telling them all that they're doing something useless and they may as well just abort. That's... quite a claim.</p>
]]></description><pubDate>Sun, 14 Jun 2026 05:55:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=48524573</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48524573</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48524573</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>I think you missed my point. I was referring to the fact that some of these standard exceptions are very much a part of the contracts of their respective functions. In fact, that's their entire point. This directly contradicts what you wrote.</p>
]]></description><pubDate>Sun, 14 Jun 2026 03:14:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=48523842</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48523842</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48523842</guid></item><item><title><![CDATA[New comment by dataflow in "GLM 5.2 Is Out"]]></title><description><![CDATA[
<p>> Ask an American LLM (really any LLM, since Chinese models are trained on the same publicly-available English text) who the first Black man in space was. You'll likely get the name of the first African-American in space, rather than the name of the Afro-Cuban who was actually first.<p>Well I just asked Claude and it gave the correct answer:<p>"The first Black man in space was Arnaldo Tamayo Méndez, a Cuban cosmonaut who flew aboard Soyuz 38 in September 1980. (The first Black American in space was Guion Bluford, in 1983.)"</p>
]]></description><pubDate>Sun, 14 Jun 2026 01:53:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48523419</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48523419</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48523419</guid></item><item><title><![CDATA[New comment by dataflow in "A Call to Action: Stop the FCC's KYC Regime"]]></title><description><![CDATA[
<p>This is neither KYC nor would that be relevant even if it were. The whole point is you could get traceability without a credit check just fine.</p>
]]></description><pubDate>Sun, 14 Jun 2026 01:45:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=48523390</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48523390</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48523390</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>> Exceptions aren't meant to report errors, just in general. That's a misuse of them. Exceptions are meant to be thrown when a contract cannot be fulfilled. Yes, you're unable to know what exceptions a function may throw. That's the way it should be, because exceptions aren't supposed to be part of the function's contract.<p>I don't think these are true? What about std::vector::at(), std::optional::value(), etc.? And then there's std::system_error.</p>
]]></description><pubDate>Sun, 14 Jun 2026 01:34:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=48523327</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48523327</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48523327</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>> One of the problems with exceptions is it’s utterly impossible to know if a given function call can return exceptions and if so what they are.<p>Could you please explain how exactly you know if a function might abort?<p>And how you figure out exactly which error codes a function might return if it does return an error?<p>And why/how your techniques for figuring out the above don't work for exceptions?<p>> Python is the bloody worst because I never effing know what the hell any damn function can throw or return. It’s so so frustrating.<p>No, it's pretty possible. Virtually any interesting function you call can throw AttributeError or TypeError, if nothing else, simply by virtue of you passing an object of the wrong type or behavior.<p>"But I don't mean <i>those</i> particular exceptions! I don't care about them." Well yeah that's kind of the point. If you can pretend that problems you don't know how to handle don't exist, then you can pretend the same for exceptions and errors. You're <i>not supposed</i> to care about the entire universe of possible error conditions; it's not only impossible but also you wouldn't be able to handle all of them anyway. You handle everything you can reasonably handle and then let the rest propagate, not the other way around. Same for error codes and exceptions.<p>"But the documentation would tell me which error codes I care about!" Well it can do that for exceptions too. If the documentation sucks then bring it up with the API developer not the language developer.<p>> But I’ll take Rust results over exceptions 10,000% of the time. Not even a question.<p>Sure, feel free to do that. Or use error codes in C++, whatever you prefer. Not like I'm trying to turn this into a Rust vs. C++ debate.</p>
]]></description><pubDate>Sun, 14 Jun 2026 00:47:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=48523070</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48523070</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48523070</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>That's nice but it's certainly not guaranteed by anything, just something provided by your toolchain or platform. ("Core dumps" aren't even a thing in C++.)<p>If you're looking for implementation-specific guarantees then you could make that happen with exceptions too. I <i>think</i> on GCC replacing a function like __cxa_throw might be sufficient to let you capture a stack trace?<p>If you're looking for source-level-only guarantees then another option is to just replace your throw <expr> statements with one that attaches whatever extra info you want. You could literally script this to patch your external repos automatically too. Or heck, maybe you could even just define throw to be a macro that shoves your stack trace into some global variable before actually throwing.</p>
]]></description><pubDate>Sat, 13 Jun 2026 19:12:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=48520441</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48520441</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48520441</guid></item><item><title><![CDATA[New comment by dataflow in "Orthodox C++ (2016)"]]></title><description><![CDATA[
<p>> build a fort to deflect the random exceptions they'll throw at you<p>Sounds like you hate exceptions, right? In which case why do you handle them at all? Just leave them all unhandled and suddenly every exception is a crash. Which is really no different from someone choosing to terminate. Which you have to worry about even without exceptions.<p>> if you have a C++ code base yet somehow have enough time and energy to write opinionated blog posts, it's really hard to imagine why you think you'd have a better take on this than Google.<p>"Given that Google's existing code is not exception-tolerant [...] Our advice against using exceptions is not predicated on philosophical or moral grounds, but practical ones. [...] <i>Things would probably be different if we had to do it all over again from scratch.</i>"</p>
]]></description><pubDate>Sat, 13 Jun 2026 16:28:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=48518796</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48518796</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48518796</guid></item><item><title><![CDATA[New comment by dataflow in "A Call to Action: Stop the FCC's KYC Regime"]]></title><description><![CDATA[
<p>> Seems that we can’t <i>both</i> get what we want.<p>Why can't you? They don't want to provide info for a credit check, you want human accountability. All that requires is for them to use a debit card for whatever service (prepaid or postpaid). Law enforcement can trace that if needed. No need for credit checks or really any other information directly in the hands of the telco.</p>
]]></description><pubDate>Fri, 12 Jun 2026 15:43:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=48505581</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48505581</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48505581</guid></item><item><title><![CDATA[New comment by dataflow in "War Crimes Seem to Be Official US Policy Now"]]></title><description><![CDATA[
<p>What is "intellectual curiosity" that <i>doesn't</i> include curiosity about whether, when, and how often the world superpower commits a war crime? For reference just the other day we had [1] on the front page. Was knowing the consumer price index for the month really all that much more satisfying of "intellectual curiosity" than this?<p>[1] <a href="https://www.bls.gov/news.release/cpi.nr0.htm" rel="nofollow">https://www.bls.gov/news.release/cpi.nr0.htm</a></p>
]]></description><pubDate>Fri, 12 Jun 2026 01:38:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=48498785</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48498785</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48498785</guid></item><item><title><![CDATA[New comment by dataflow in "War Crimes Seem to Be Official US Policy Now"]]></title><description><![CDATA[
<p>This being evidence of an interesting new phenomenon is literally the <i>entire premise</i> of the blog post though. And it sure as hell didn't look like it was covered on the main news headlines; I know I only heard about it because of HN. The author is pretty clearly claiming this is a new phenomenon literally in the title itself!</p>
]]></description><pubDate>Thu, 11 Jun 2026 21:38:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=48496796</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48496796</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48496796</guid></item><item><title><![CDATA[New comment by dataflow in "The $15,000 AI Bill. Your $20 Subscription is a DELUSION [video]"]]></title><description><![CDATA[
<p>Are you including capex when you say "cost"? Or are you just looking at inference costs?</p>
]]></description><pubDate>Thu, 11 Jun 2026 16:03:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=48492216</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48492216</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48492216</guid></item><item><title><![CDATA[New comment by dataflow in "War Crimes Seem to Be Official US Policy Now"]]></title><description><![CDATA[
<p>Why in the world is this flagged?</p>
]]></description><pubDate>Thu, 11 Jun 2026 15:52:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=48492050</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48492050</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48492050</guid></item><item><title><![CDATA[New comment by dataflow in "A Farmer Donated Land to Turn into a Park. The City Is Building a Data Center"]]></title><description><![CDATA[
<p>> data center companies could genuinely at least open up for tours to try to appeal to the public, if public approval is apparently such a concern.<p>Do you actually find anything appealing about a datacenter? I've been to one and while it was mildly cool from the standpoint of "wow how do they manage this many machines" I didn't find anything appealing about it that would make me want it in my neighborhood.</p>
]]></description><pubDate>Thu, 11 Jun 2026 03:22:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=48485863</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48485863</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48485863</guid></item><item><title><![CDATA[New comment by dataflow in "A Farmer Donated Land to Turn into a Park. The City Is Building a Data Center"]]></title><description><![CDATA[
<p>What do you see as wrong with that? What was supposed to happen to the land instead?</p>
]]></description><pubDate>Thu, 11 Jun 2026 03:14:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=48485821</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48485821</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48485821</guid></item><item><title><![CDATA[New comment by dataflow in "Sequoyah’s syllabary created a written language for the Cherokee"]]></title><description><![CDATA[
<p>Might be a mess linguistically, but it's sure nice to have only 26 letters with no accents on a keyboard.</p>
]]></description><pubDate>Wed, 10 Jun 2026 23:36:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=48484299</link><dc:creator>dataflow</dc:creator><comments>https://news.ycombinator.com/item?id=48484299</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48484299</guid></item></channel></rss>