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.

Dancing the Limbo

https://schrottner.at/2026/06/14/Dancing-the-limbo.html
1•RyeCombinator•1m ago•0 comments

Show HN: Convert the raw HealthKit DB from an iPhone backup to SQLite

https://github.com/ninyawee/healthkit-from-backup-to-sqlite
1•circleoncircles•2m ago•0 comments

Saddam husseins love of masgouf got him caught

https://www.godreports.com/2015/04/saddam-husseins-appetite-for-fish-led-to-his-capture/
1•marysminefnuf•2m ago•0 comments

Building an LLM safe design system

https://polar.sh/blog/orbit-llm-safe-design-system
1•SouravInsights•5m ago•0 comments

People Paying $59 to Make Phones Worse. Speaks Volumes About Tech World

https://www.inc.com/connor-jewiss/people-are-paying-59-to-make-their-phones-worse-the-reason-why-...
1•1vuio0pswjnm7•5m ago•0 comments

Anthropic Is Still at Odds with the White House over Claude Fable 5

https://www.wired.com/story/anthropic-is-still-at-odds-with-the-white-house-over-claude-fable-5/
1•dstala•9m ago•0 comments

The B2C-or-B2B decision you're forced to make too early

https://www.indiehackers.com/post/the-b2c-or-b2b-decision-youre-forced-to-make-too-early-and-why-...
1•DharmendraJago•12m ago•0 comments

Murmer – An experiment in bringing Elixir's actor model to Rust

https://paxsonsa.github.io/murmer-rs/
1•paxsonsa•16m ago•1 comments

GLM-5.2

https://huggingface.co/zai-org/GLM-5.2
2•gomizhuce•19m ago•1 comments

Designing the Dream House of an 87-Year-Old Tech Visionary

https://www.wired.com/story/stewart-brand-whole-earth-catalog-house-petaluma/
1•cromulent•21m ago•0 comments

Show HN: FinMind AI – what if Claude Code was built for Wall Street?

https://finmindai-moneyverse.vercel.app/
2•heroboy•26m ago•0 comments

From AI Job Board to Talent Pool and hitting $1k/mo in 6 months

https://www.indiehackers.com/post/from-ai-job-board-to-talent-pool-and-hitting-1k-mo-in-6-months-...
2•celadondev•26m ago•0 comments

Is Horsewood Safe? Understanding the Horse Wood Warning

https://finance.yahoo.com/sectors/healthcare/articles/horsewood-urgent-report-2026-horse-19110038...
1•fatnhaus•26m ago•0 comments

Asked ChatGPT, how to recover data from disk, "run wipefs"

https://chatgpt.com/share/6a322911-2f14-83e9-a357-559a6175df1e
1•TZubiri•27m ago•2 comments

A Red-Team Study of Anthropic Fable 5 and Opus 4.8 Models

https://arxiv.org/abs/2606.18193
1•ilreb•29m ago•0 comments

Intrusive Driving Aids make driving worst

https://www.youtube.com/watch?v=f-S76WEl25k
1•afarah1•31m ago•0 comments

Looped World Models

https://arxiv.org/abs/2606.18208
1•ilreb•33m ago•0 comments

GPT-2 124M checkpoint pre-trained on OpenWebText 27.5B tokens

https://github.com/workofart/ml-by-hand/releases/tag/gpt2-124m-openwebtext-56000
1•megadragon9•34m ago•1 comments

Dear Researchers: Help me deal with incidents [pdf]

https://surfingcomplexity.blog/wp-content/uploads/2026/06/dear-researchers.pdf
2•azhenley•34m ago•0 comments

The reason some American roundabouts are so dangerous [video]

https://www.youtube.com/watch?v=Pvqzei4HhFY
1•dataflow•36m ago•0 comments

Cursor Origin: code storage and Git hosting

https://twitter.com/cursor_ai/status/2067012220832329782
2•peterspath•36m ago•0 comments

The Slop Paradox

https://arxiv.org/abs/2606.17791
1•ilreb•37m ago•0 comments

Only Bounds

https://smallcultfollowing.com/babysteps/blog/2026/06/09/only-bounds/
1•yurivish•44m ago•0 comments

Cypriot Graffiti in Ancient Egypt

https://www.historytoday.com/archive/history-matters/cypriot-graffiti-ancient-egypt
1•benbreen•45m ago•0 comments

California's tectonic systems at highest levels of stress in 1k years

https://www.theguardian.com/us-news/2026/jun/16/california-earthquake-tectonic-systems-risk
2•andsoitis•47m ago•0 comments

Stop making AI looking landing pages

https://www.aibrandkits.com
2•mattmerrick•47m ago•2 comments

Show HN: IAGlobal – A multi-agent cognitive architecture inspired by biology"

https://github.com/josemarpoubel/iaglobal
1•josemarpoubel•49m ago•0 comments

Reflections on Trusting Trust (1984) [pdf]

https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf
1•_doctor_love•54m ago•0 comments

NetNewsWire Status

https://inessential.com/2026/06/15/netnewswire-status.html
14•droidjj•54m ago•1 comments

Fable is gone but the loop isn't

https://github.com/grainulation/bean
4•woptober•55m ago•0 comments