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.

Helix World: A Real-Time Audio-Visual World Model

https://noiz.ai/lp/blog/meet-helix-world
1•gmays•1m ago•0 comments

Problems with the Rust Language

https://oxetene.net/problems-with-the-rust-language/
1•embedding-shape•2m ago•0 comments

Anthropic revenue jumps to $16.8B in third quarter

https://www.ft.com/content/11632d03-358c-454b-af95-d06d4072932b
1•orf•2m ago•0 comments

Benchmarking decision models for relevance judgments

https://iwhalen.com/relevance-bench/
1•iwhalen•4m ago•0 comments

What's a Nonius?

https://hackaday.com/2026/10/14/whats-a-nonius/
1•alberto-m•6m ago•0 comments

Strive Targets $500M Raise to Buy More Bitcoin

https://coinmarketcap.com/community/post/380133331/
1•joeymabia1•6m ago•1 comments

Show HN: Fantastic Canvas

https://github.com/aisixteen/fantastic
2•Alexadar•6m ago•1 comments

New York City Agrees to Profit-Sharing Deal with NYU Quantum Lab

https://www.nytimes.com/2026/10/14/nyregion/mamdani-nyu-quantum-partnership.html
1•appleappleapple•6m ago•0 comments

Nvidia's China AI-chip share falls to 34% as Huawei reaches 28%

https://technode.com/2026/10/14/nvidias-china-ai-chip-share-falls-to-34-as-huawei-reaches-28/
2•yogthos•9m ago•0 comments

Inference vs. Distillation

https://debarshibasak.github.io/readables/blogs/inference-vs-distillation
2•debarshri•9m ago•0 comments

Coding with AI stopped feeling like craft, so I built a tiny desk radio

https://radiowaveshare.vercel.app
1•mayilian•9m ago•0 comments

ESA targets Anbernic emulation handhelds as "superfake" piracy enablers

https://www.osnews.com/story/146148/esa-targets-anbernic-emulation-handhelds-as-superfake-piracy-...
1•iamnothere•11m ago•0 comments

Show HN: Walk or your virtual pet gets fat

https://apps.apple.com/au/app/terry-pedometer-step-counter/id6818785615
1•VatanaChhorn•13m ago•0 comments

Atelier – Watch AI Learn to Paint (Sometimes, Live)

https://atelier.randomdrake.com
1•randomdrake•13m ago•0 comments

ZenOS–A clean, minimal E-Reader experience

https://github.com/xZenLabs/zen-os
1•Cider9986•13m ago•0 comments

What MCP changes about enterprise software

https://www.deepl.com/en/blog/what-mcp-changes-about-enterprise-software
1•mooreds•13m ago•0 comments

Anthropic revenue jumps to $16.8B in third quarter, claims profitable

https://www.reuters.com/technology/anthropic-revenue-jumps-168-billion-third-quarter-ft-reports-2...
5•yakkomajuri•14m ago•0 comments

Stubborn Sellers Are the Last Thing Propping Up Home Prices

https://www.wsj.com/economy/housing/stubborn-sellers-are-the-last-thing-propping-up-home-prices-d...
1•toomuchtodo•14m ago•0 comments

Into the Rat's Nest: A SenseOn Analysis of the NetSupport Rat

https://www.senseon.io/blog/netsupport-rat-analysis
1•mooreds•14m ago•0 comments

VSCode, granular control over Copilot changes

https://github.com/microsoft/vscode/issues/339363
1•juanpabloaj•15m ago•0 comments

Open source text and image to CAD harness for build123d, OpenSCAD, and smlibpy

https://github.com/nanassound/mnft
2•bepitulaz•15m ago•0 comments

Show HN: Ito – build terminal UI in Lua

https://uji.sh/ito/
1•cat-whisperer•16m ago•0 comments

No single person has spent more money to harm EVs than Tesla CEO Elon Musk

https://electrek.co/2026/10/12/no-single-person-has-spent-more-money-to-harm-evs-than-tesla-ceo-e...
6•billybuckwheat•18m ago•0 comments

Apple announces HomeView, a $299 smart display to push Siri AI into homes

https://www.cnn.com/2026/10/13/tech/apple-homeview-siri-ai
1•ammarmalik17•21m ago•0 comments

Reflex, a TUI that compiles Claude Code and Codex transcripts into agent skills

https://github.com/sumervaid/reflex-tui
2•vaidsumer•22m ago•0 comments

Tiny Little Office

https://tinylittleoffice.com/
19•donohoe•30m ago•4 comments

Show HN: Warpdom – drop-in jsdom replacement for Vitest and Jest

https://github.com/sonukapoor/warpdom
1•sonukapoor•30m ago•0 comments

8.8M records hacked from Danish national registry with password 123456

https://www.tomshardware.com/tech-industry/cyber-security/hacker-claims-123456-password-let-them-...
3•jameslk•31m ago•1 comments

Sigsaly: Churchill's top secret hotline to the President

https://www.iwm.org.uk/history/iwm/cwr/telephone
1•stmw•32m ago•0 comments

The Cambridge Companion to Music and Fascism

https://www.prestomusic.com/books/products/9864806--the-cambridge-companion-to-music-and-fascism
1•jjgreen•33m ago•0 comments