frontpage.
newsnewestaskshowjobs

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.

Show HN: Review agent changes locally before pushing

https://github.com/marcparadise/reviewer
1•GrinningFool•1m ago•0 comments

Show HN: In-Browser WASM Engine – Analytical Queries in 0.25ms

https://mlegal-pwa-app.web.app
1•mlegal_tech•3m ago•0 comments

The Story of Fckgw-RHQQ2-Yxrkt-8TG6W-2B7Q8

https://twitter.com/davepl1968/status/2099883465256865923
1•hnburnsy•5m ago•0 comments

Photos show damage at U.S. positions caused by Iranian missile, drone attacks

https://www.cbsnews.com/news/new-photos-damage-u-s-kuwait-saudi-arabia-iran-drone-missile-attacks/
1•cwwc•6m ago•0 comments

Single Prompt Knowledge Graphs

https://app.corvic.ai/view/memory/88cf5889-0d85-409e-8b51-f621ad519b88
1•GG533•7m ago•0 comments

Khipu (Quipu) Field Guide

https://www.khipufieldguide.com/
1•SanjayMehta•8m ago•0 comments

Grandma disables a fiber optic drone

https://twitter.com/United24media/status/2099842961731142003
1•consumer451•11m ago•0 comments

Trump administration releases fifth batch of UFO files

https://www.space.news/2026-08-10-trump-administration-releases-fifth-batch-ufo-files.html
2•KinetiNode•13m ago•0 comments

Show HN: Thurbox – A tmux-based TUI and CLI for local AI agent orchestration

https://github.com/Thurbeen/thurbox
2•magicleturcrttm•15m ago•0 comments

We cut CDN metadata lookup latency by 91%

https://vercel.com/blog/how-we-cut-cdn-metadata-lookup-latency-by-91-percent
1•iamsyr•17m ago•0 comments

Artificial Intelligence, Quote Unquote

https://www.penny-arcade.com/news/post/2026/09/15/artificial-intelligence-quote-unquote
1•jkestner•17m ago•0 comments

The Death of "Link in Bio"

https://peachandcherry.com/blog/text-me
2•zyloquenstar•24m ago•0 comments

Seats and Sunsets

https://yegge.ai/essays/seats-and-sunsets/
1•andsoitis•28m ago•0 comments

Medog Hydropower Station (60 GW hydropower project)

https://en.wikipedia.org/wiki/Medog_Hydropower_Station
2•cl42•28m ago•0 comments

I Hired a Lawyer to Fight UMG (Feat. LegalEagle) [video]

https://www.youtube.com/watch?v=M8HxQkk0PSY
1•sbuttgereit•33m ago•0 comments

Nvidia Expands Open Source CUDA-Q Platform for Fault-Tolerant Quantum Computing

https://nvidianews.nvidia.com/news/nvidia-expands-open-source-cuda-q-platform-for-fault-tolerant-...
1•noobplus•33m ago•0 comments

A mnemonic-free wallet where the private key never leaves the phone's TEE

1•niumeta_TZ•33m ago•0 comments

Marginalia Search

https://marginalia-search.com/
2•thunderbong•34m ago•0 comments

Internet shutdown crosses 100 days in Pakistan-administered Kashmir

https://www.aljazeera.com/news/2026/9/15/internet-shutdown-crosses-100-days-in-pakistan-administe...
2•alephnerd•36m ago•0 comments

Musk proposes adversarsial peer review for AI Safety

https://twitter.com/theallinpod/status/2099731166530277549
2•thedragongc•37m ago•0 comments

Thoughts and Observations on apples iPhones duo 18pro event

https://daringfireball.net/2026/09/thoughts_and_observations_on_apples_surprise_and_shine_event
2•djfergus•41m ago•0 comments

Clarity Act (crypto) fails in the Senate

https://www.nytimes.com/2026/09/15/technology/senate-blocks-crypto-bill.html
1•krrishd•43m ago•1 comments

Coreutils – Rejected Feature Requests

https://www.gnu.org/software/coreutils/rejected_requests.html
3•birdculture•44m ago•0 comments

Cerebras-powered, instant design canvas using Qwen3.8-27B [video]

https://www.youtube.com/watch?v=yC4RKUyUt1Y
1•thegeomaster•45m ago•0 comments

Show HN: Now You Can Use – Web Baseline Timeline

https://nowyoucanuse.com/
1•Hyperlisk•46m ago•0 comments

Recent Decisions Spark Questions on GenAI, Privilege, and Privacy Expectations

https://ktslaw.com/insights/alert/2026/4/recent-decisions-spark-questions-on-generative-ai-privil...
1•mooreds•47m ago•0 comments

Contrails.org – Contrail Avoidance for the Climate

https://contrails.org/
1•thenobsta•49m ago•0 comments

Landing the Space Shuttle – A Flying Machine and the Thrill of a Lifetime

https://inspire.eaa.org/2019/05/16/landing-the-space-shuttle-an-incredible-flying-machine-and-the...
1•JojoFatsani•49m ago•1 comments

Show HN: AgentReady – can AI assistants read your site?

https://shop.lumnika.com/lab/agentready/?src=hackernews-showhn
2•deusautoai725•50m ago•0 comments

Show HN: Leo – a Markdown engineering process for AI coding agents

https://github.com/alex-zaporozhan/leo
2•alex-zaporozhan•53m ago•0 comments