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.

Bimodal Nuclear Engine Could Speed Mars Trip

https://spectrum.ieee.org/bimodal-nuclear-engine
1•rbanffy•34s ago•0 comments

Show HN: Issue tracker that replays workflows, deeply integrated with the code [video]

https://www.youtube.com/watch?v=XDhrvLGzyfc
1•ionetan•1m ago•0 comments

AU government is planning 2 implement opt-in and opt-out feature on social media

https://www.news24.com.au/politics/australian-politics/the-australian-government-is-looking-to-im...
1•asdefghyk•3m ago•1 comments

Show HN: I made a signage visualizer tool for sign making companies

https://www.signagevisualizer.com/
1•atharvtathe•3m ago•0 comments

Steven Bartlett sharing harmful health misinformation in Diary of CEO podcast [video]

https://www.youtube.com/watch?v=XV_B96fAzKs
1•mgh2•5m ago•0 comments

Ask HN: Is .org now Trump-controlled?

2•selfhoster1312•8m ago•0 comments

Hotline for AI Agents to Report Safety Incidents

https://agenthotline.ai/
1•unyxfly•9m ago•0 comments

Resurrecting 2013 with Qwen3.8 27B

https://xcjs.com/blog/2026/08/29/resurrecting-2013-with-qwen3.8-27b
1•xcjs•10m ago•0 comments

How AI Is Reshaping Pediatric Imaging

https://www.childrenshospitals.org/news/childrens-hospitals-today/2026/08/how-ai-is-reshaping-ped...
1•ryzvonusef•12m ago•1 comments

Show HN: I built a terminal pager that runs in Colab

https://github.com/dawsonhuang0/Less-Pager-Mini
1•DevDawg•15m ago•0 comments

The Cybersecurity Apocalypse Is Coming in 'Months,' AI Giants Warn

https://www.wired.com/story/security-news-this-week-the-cybersecurity-apocalypse-is-coming-in-mon...
3•joozio•18m ago•0 comments

European Stagnation Is Real

https://www.siliconcontinent.com/p/european-stagnation-is-real
1•barry-cotter•19m ago•0 comments

Show HN: AgentGate – signed receipts for AI agent SaaS actions

https://github.com/Clawdlinux/agentgate
1•goodra7174•19m ago•0 comments

AIPass – AI agents whose memory is small JSON files they own

https://aipass.ai
1•AIOSAI•22m ago•0 comments

Anthropic warns users of possible token theft

https://www.reddit.com/r/ClaudeAI/comments/1w1jqsh/thank_you_anthropic_really/
2•basedpolymer•23m ago•0 comments

Smartphone LED Detects Hidden Cameras with AI

https://www.chosun.com/english/industry-en/2026/08/30/SBFXUIJQYZEARKP5T4FBAY25HQ/
2•geox•28m ago•0 comments

Algorithmic Theories of Everything (2000)

https://arxiv.org/abs/quant-ph/0011122
1•tosh•29m ago•0 comments

Hart's Location, NH

https://en.wikipedia.org/wiki/Hart%27s_Location,_New_Hampshire
1•sans_souse•32m ago•1 comments

Ask HN: Do you still write code by yourself?

1•codst•38m ago•1 comments

Morphe App: Transform Your Android Experience

https://morphe.software/
1•thunderbong•40m ago•0 comments

Commodore 77

https://commodore.net/store/commodore64/
1•doener•42m ago•0 comments

Put full images in QR codes with dithering

https://www.wowqr.app
1•alentodorov•48m ago•0 comments

A decision tree for picking attention

https://efficientagent.substack.com/p/a-decision-tree-for-picking-attention
3•bnayak25•48m ago•0 comments

1988-1994: Designated Driver Campaign

https://guides.library.harvard.edu/CHC/designateddriver
1•Michelangelo11•49m ago•0 comments

An official Linux version of the Grok bot is now available

https://twitter.com/m0nle0z/status/2093948285929353555
1•iamsyr•53m ago•0 comments

I Built a Free Printable Habit Tracker Because Most Habit Tracking Tools

https://www.indiehackers.com/post/i-built-a-free-printable-habit-tracker-because-most-habit-track...
2•ahmadhussain89•57m ago•0 comments

About Syria's Nightlife

https://twitter.com/i/status/2093806659868950549
1•Michelangelo11•1h ago•0 comments

Show HN: VelocityNote – A tiny Markdown notebook with local AI

https://velocitynote.app/
2•velocityNote•1h ago•0 comments

How the pre-Unicode Amharic encodings were mapped

https://ezra.et/how-amharic-encodings-were-mapped
1•tena_codes•1h ago•0 comments

A Cop's Case for Flock

https://worksinprogress.co/issue/a-cops-case-for-flock/
2•maxall4•1h ago•0 comments