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•10mo ago

Comments

zoezoezoezoe•10mo 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•10mo 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.

My journey from foreign correspondent to Uber driver in Trump's America

https://stevescherer.substack.com/p/my-journey-from-foreign-correspondent
1•only_in_america•48s ago•0 comments

Show HN: Shadowscan – see what an AI agent can access on your machine

https://github.com/LakshmiSravyaVedantham/shadowscan
1•sravyavedantham•49s ago•0 comments

Claude Code building 100 mini games with one prompt (5.3M tokens)

https://twitter.com/amgauge/status/2031809325375897931
1•august-•1m ago•0 comments

Sensational news. Fintech has published banking secrets for public access

https://sfg.media/en/a/monobank-accuses-client-collaboration-slovenian-flag-mistake/
1•Kizert•2m ago•0 comments

Vitalina: Export Your Apple Health Data as CSV/JSON

https://apps.apple.com/us/app/health-data-exporter-vitalina/id6759179139
2•MegaMaddin•6m ago•1 comments

Digital Democracy

https://calmatters.digitaldemocracy.org/
2•jruohonen•7m ago•0 comments

Kishida Prize crowns wordsmiths in the theater world

https://www.japantimes.co.jp/culture/2026/02/26/stage/kishida-prize-theater-japan/
3•PaulHoule•10m ago•0 comments

Zoox starts mapping Dallas and Phoenix for its robotaxis

https://techcrunch.com/2026/03/09/zoox-starts-mapping-dallas-and-phoenix-for-its-robotaxis/
2•gmays•11m ago•0 comments

Surgical Repair of Collapsed Attention Heads in ALiBi Transformers

https://arxiv.org/abs/2603.09616
3•palmerschallon•11m ago•1 comments

Why Escalation Favors Iran

https://www.foreignaffairs.com/iran/why-escalation-favors-iran
6•decimalenough•12m ago•1 comments

Thanks, ChatGPT

https://www.robpanico.com/articles/display/?entry_short=thanks-chatgpt
2•retrocog•12m ago•1 comments

Wired headphone sales are exploding. What's with the Bluetooth backlash?

https://www.bbc.com/future/article/20260310-wired-headphones-are-better-than-bluetooth
14•billybuckwheat•14m ago•2 comments

Feature Unrequest

https://kudmitry.com/articles/feature-unrequest/
3•skwee357•16m ago•0 comments

OrthoScience – Hybrid search engine for 500K+ orthopedic translational research

https://orthoarchives.com/en/orthoscience/search
2•DrMeric•16m ago•1 comments

Don't post generated/AI-edited comments. HN is for conversation between humans.

https://news.ycombinator.com/newsguidelines.html#generated
120•usefulposter•22m ago•23 comments

An Update from First Board Chair Laurie Leshin

https://www.firstinspires.org/about/press-room/an-update-from-first-board-chair-laurie-leshin
2•ndrake•22m ago•0 comments

Show HN: R2 Desk Pro – a vault-locked desktop client for CF R2 (Tauri/Rust)

https://r2desk.greeff.dev
2•pio_greeff•23m ago•0 comments

A record share of U.S. workers now have access to paid leave

https://19thnews.org/2026/03/paid-leave-policies-united-states/
3•mooreds•23m ago•0 comments

I'm glad the Anthropic fight is happening now

https://www.dwarkesh.com/p/dow-anthropic
3•emschwartz•23m ago•0 comments

Over puppy yoga? Try it with snakes

https://text.npr.org/nx-s1-5743865
2•mooreds•23m ago•0 comments

Do You Need to Wash New Clothes Before Wearing Them?

https://www.nytimes.com/2026/03/10/well/wash-new-clothes-before-wearing.html
3•mooreds•23m ago•0 comments

Buying a Laptop Online Is a Broken Experience (2018)

https://blog.raed.dev/posts/buying_laptop_online_broken_experience/
2•Raed667•25m ago•0 comments

We Built a Linux Kernel Mailing List Front End

https://nexus-kb.com/blog/nexus-kb-announcement/
3•tansanrao•27m ago•0 comments

Ask HN: Developers still enjoying development after AI?

3•aavci•27m ago•3 comments

The Internet Has 100M Shops and No Front Door

https://askucp.com/blog
2•possiblelion•27m ago•0 comments

OmniCode: A Benchmark for Evaluating Software Development Agents

https://arxiv.org/abs/2602.02262
2•foma-roje•29m ago•0 comments

From IDEs to AI Agents with Steve Yegge [video]

https://www.youtube.com/watch?v=aFsAOu2bgFk
2•claudiug•29m ago•1 comments

Show HN: Daub – A rendering spec for AI-generated UIs (two files, no build step)

https://daub.dev
2•kulesh•32m ago•0 comments

FBI warns Iran wanted to attack California with drones

https://www.sfchronicle.com/california/article/iran-drones-west-coast-attack-22071032.php
4•babelfish•32m ago•0 comments

The Passion of Will Self

https://www.newstatesman.com/culture/books/2026/03/the-passion-of-will-self
3•apollinaire•34m ago•0 comments