frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•1y ago

Comments

zoezoezoezoe•1y ago
I dont know if I fully agree. Sure, there is definitely an argument the be had about whether or not `continue` is the best word to use in this instance, but why avoid it entirely? Every programmer is able to easily understand what code like this would do:

``` for (Node node : nodeList) { if (node.isBad()) { continue; } processNode(node); } ```

Every keyword in any programming language is largely arbitrary in my opinion let's take a look at the beginning of the codeblock `for (Node node : nodeList)` also completely arbitrary, though it's clear to anyone who's ever written C++ that it is equivalent to saying "for every node in nodeList".

Continue is not meant to read as "continue execution" it's meant to be "continue to the next item of the list", and I think avoiding it entirely is a pointless effort.

Ukv•1y ago
I feel `skip` may have been a better name, but disagree with it being logically difficult to parse beyond that.

If I'm reading a loop and see

    for x in y {
        if exclusions.contains(x) { skip; }
        if x.children.length == 0 { skip; }
        if os.file.exists(x.name) { skip; }
        ...
I instantly know that processing for those elements is skipped, and they won't be relevant for the rest of the loop.

Whereas if I see

    for x in y {
        if !exclusions.contains(x) {
            if x.children.length != 0 {
                if !os.file.exists(x.name) {
        ...
I feel like there's still mental overload with not knowing where those `if` blocks end, and so having to keep the conditions in mind. It doesn't immediately tell me that the rest of the loop is being skipped.

The `log()` mistake seems no less likely to happen using early-returns in function instead, and I'd argue nesting checks actually introduces more room for that kind of error overall, where you append something at the end within the wrong set of brackets, compared to a flatter structure.

Finding Miscompiles for Fun, Not Profit

https://newsletter.semianalysis.com/p/finding-miscompiles-for-fun-not-profit
1•tmoertel•43s ago•0 comments

Illinois Lawmakers Just Passed America's Strongest AI Safety Bill

https://www.wired.com/story/illinois-pass-major-ai-safety-law-pritzker/
2•droidjj•6m ago•1 comments

AI Cheats [pdf]

https://metr.org/risk-report-feb-mar-2026.pdf
1•brian_herman•16m ago•0 comments

One Job That Is Growing in the A.I. Era? Cybersecurity Experts

https://www.nytimes.com/2026/05/24/technology/ai-cybersecurity-jobs.html
1•mooreds•19m ago•0 comments

Two Researchers Are Rebuilding Mathematics from the Ground Up

https://www.quantamagazine.org/two-researchers-are-rebuilding-mathematics-from-the-ground-up-2026...
1•pseudolus•20m ago•0 comments

You Will Never Upload Your Mind: The ASML Machine vs. One Living Neuron

https://julianzoria.substack.com/p/why-you-will-never-upload-your-mind
1•JulianZoria•21m ago•0 comments

Google employee charged with $1M Polymarket insider trading bet on search term

https://www.cnbc.com/2026/05/27/google-employee-polymarket-insider-trading.html
5•pseudolus•21m ago•0 comments

Understanding CORS for API Developers

https://www.postpilot.dev/blog/understanding-cors-for-api-developers
1•anlac96_it•23m ago•0 comments

Yes, Designers Should Code

https://www.bitsandletters.com/ideas/what-is-a-design-engineer
1•demaree•25m ago•0 comments

Learning about food and myself at the "edge of the world"

https://medium.com/@mnm2163/learning-about-food-and-myself-at-the-edge-of-the-world-c1185a7c5b5f
1•mooreds•28m ago•0 comments

Can we have the day off?

https://mlsu.io/posts/day-off/
112•mlsu•30m ago•46 comments

Xerolith

https://xerolith.com/
3•XerolithAI•34m ago•0 comments

The Pioneer Anomaly

https://en.wikipedia.org/wiki/Pioneer_anomaly
1•Jimmc414•36m ago•0 comments

Woman without right hand charged for holding phone in right hand while driving

https://cbs12.com/news/local/florida-news-viral-tiktok-charges-dismissed-for-woman-without-right-...
5•hn_acker•37m ago•4 comments

Show HN: An update to our long-turn FreeCiv experience

https://freeciv.andrewmcgrath.info/
2•verelo•47m ago•0 comments

StumbleTV: Chat Roulette but for Exposed Webcams

https://stumbletv.alectrocute.workers.dev/c/2e6ff336f1235cc1
3•arm32•49m ago•0 comments

The millionaires tax was pitched as a $2B revenue source. It's blown past that

https://www.bostonglobe.com/2026/05/25/metro/millionaires-tax-massachusetts/
3•ceejayoz•52m ago•0 comments

Delaware court upholds voting by companies in small town's election

https://www.reuters.com/legal/government/delaware-court-upholds-voting-by-companies-small-towns-e...
3•anigbrowl•52m ago•0 comments

Poll: Would you allow a first generation plumber robot in your home?

2•Bender•1h ago•1 comments

Amazon Strikes $6B Deal with Snowflake for Agentic Computing Chips

https://www.wsj.com/tech/amazon-strikes-6-billion-deal-with-snowflake-for-its-agentic-computing-c...
3•jpau•1h ago•0 comments

Breaking Rust

https://en.wikipedia.org/wiki/Breaking_Rust
2•petethomas•1h ago•0 comments

Agents can sign up for Composio

https://composio.dev/blog/your-agents-can-signup-for-composio
2•mooreds•1h ago•0 comments

Xania Monet

https://en.wikipedia.org/wiki/Xania_Monet
2•petethomas•1h ago•0 comments

Agent Security Is a Systems Problem

https://arxiv.org/abs/2605.18991
2•yakkomajuri•1h ago•0 comments

Attrition: The Chinese Family Collapse

https://www.strategypage.com/htmw/htatrit/articles/2026052754034.aspx
4•skmurphy•1h ago•2 comments

The Authorization Paradox: Who Has the Keys to Your AI? [video]

https://www.youtube.com/watch?v=5UUpxgcGKXk
2•mooreds•1h ago•0 comments

GitMo – Auto sync your local project files to GitHub while you work.

https://github.com/KyleBenzle/GitMo/tree/main
2•WWIII_Historian•1h ago•1 comments

Ansel: Complete Pipeline Overhaul

https://ansel.photos/en/news/complete-pipeline-overhaul/
2•neucoas•1h ago•0 comments

Dutch block US takeover of Solvinity as against public interest

https://www.reuters.com/technology/dutch-government-block-takeover-cloud-services-company-solvini...
4•rectang•1h ago•1 comments

Show HN: Liiists, a Markdown-first, iOS and CLI list app

https://github.com/djt53/liiists
2•dtingle•1h ago•0 comments