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.

Netflix Viewers Are Abandoning Shows After One Season

https://www.bloomberg.com/news/newsletters/2026-07-05/netflix-viewers-are-abandoning-shows-after-...
1•kgwgk•3m ago•0 comments

Bede Liu, pioneer in digital signal processing and beloved mentor, dies at 91

https://www.princeton.edu/news/2026/06/24/bede-liu-pioneer-digital-signal-processing-and-beloved-...
1•aragonite•4m ago•0 comments

Show HN: AI Notebook for Data Science – Kind of Like Cursor but for Jupyter

https://www.clusy.io
1•eldar_hsnv•10m ago•0 comments

Inflect – Correctly generate plurals, ordinals; convert numbers to words

https://github.com/jaraco/inflect
2•jawns•14m ago•0 comments

Declaration of Independence

https://notebooklm.google.com/notebook/eeb66446-cee8-4b4c-91cd-a571a350908e/artifact/dc5e2ad4-4ae...
1•golgolgikdhdue•14m ago•1 comments

LLM Big Bang: I gave AI agents a social network. One is running for president

https://noozra.com/articles/the-llm-big-bang
2•gv_ai•15m ago•0 comments

Inter Font Family

https://rsms.me/inter/
4•jawns•18m ago•0 comments

Show HN: list55: PWA to transcribe into a plain text list

https://list55.enzom.dev/
1•emadda•20m ago•0 comments

Census '27: Reporting statistics privately without "banned" Differential Privacy [pdf]

https://magarshak.com/papers/privacy/Reporting.pdf
1•EGreg•20m ago•1 comments

My 11-year-old font bug

https://hackers.pub/@yurume/019f34c6-8950-78f6-81fc-c1cadd648d74
1•lifthrasiir•23m ago•0 comments

Diary of a CEO Is Making You Less Successful [video]

https://www.youtube.com/watch?v=CbDQs_TcyN4
2•kklisura•24m ago•0 comments

Len Sassaman Forensic Dead Ends at Black Hat – USA – 2002 [video]

https://www.youtube.com/watch?v=FOp29uhuM1o
1•binyu•28m ago•0 comments

The Sutra of the Open Door

https://pastebin.com/SbJ1W47Z
2•Muromec•32m ago•0 comments

Al Vigier: Canada's AI strategy shouldn't include secret Palantir bills

https://www.readtheline.ca/p/al-vigier-canadas-ai-strategy-shouldnt
22•ClearwayLaw•36m ago•5 comments

The Voice Agent Builder

https://x.ai/news/grok-voice-agent-builder
2•frankacter•38m ago•0 comments

Show HN: AI-related Jax module (I hate if)

https://github.com/PJHkorea/egregore-core-jax
2•PJHkorea•39m ago•3 comments

Strange Balls found on Queensland beaches could be toxic 'space debris': experts

https://www.inkl.com/news/strange-balls-found-on-queensland-beaches-could-be-toxic-space-debris-e...
4•ivewonyoung•42m ago•0 comments

Egg companies made $1.22B in profit off $6 carton

https://fortune.com/2026/07/02/egg-price-fixing-crisis-cover-cash-and-eggs/
11•gscott•43m ago•0 comments

We're All Managers Now: My Journey into AI-Assisted Development

https://mattmccormick.ca/we-re-all-managers-now-my-journey-into-ai-assisted-development/
4•mattm•43m ago•0 comments

Building Agents That Don't Break Themselves

https://fly.io/blog/building-agents-that-dont-break-themselves/
2•ryantsuji•46m ago•0 comments

Engineering Micro-Submarines to Replace Fish

https://hackaday.com/2026/07/01/engineering-micro-submarines-to-replace-fish/
6•croes•48m ago•0 comments

The Private Capture of Public Genius

https://www.wysr.xyz/p/the-private-capture-of-public-genius
5•martialg•48m ago•0 comments

First Full-Scale, 3D-Printed Reactor Module Produced

https://www.tomshardware.com/3d-printing/startup-unveils-3d-printed-nuclear-reactor-module-to-pow...
3•Meerax•50m ago•0 comments

Has_not_been_viewed_much

https://iamwillwang.com/notes/has-not-been-viewed-much/
29•wxw•51m ago•4 comments

Ampera marks major nuclear milestone

https://www.prnewswire.com/apac/news-releases/ampera-marks-major-nuclear-milestone-302817167.html
2•Meerax•52m ago•2 comments

Show HN: AI integrated in any terminal that's invisible until you need it

https://terminai.app
3•emosenkis•54m ago•0 comments

Newport: Submarket GPU allocations for venture-backed startups

https://newport.ai
2•kxter•54m ago•0 comments

Show HN: Three small browser primitives – identity, handoff, durable local

https://oss.sarwagya.wtf
2•0xsarwagya•56m ago•0 comments

US Navy is flight-testing 3D-printed fighter jet parts

https://www.tomshardware.com/3d-printing/us-navy-testing-3d-printed-fighter-jet-parts-for-quick-r...
4•logickkk1•57m ago•0 comments

Reactive – Markdown to interactive web apps, running in-browser

https://reactivenet.ai/
2•clmanes•58m ago•0 comments