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.

Ryanair quietly changes seating policy for passengers who do not pre-book seat

https://www.irishtimes.com/life-style/travel/2026/11/23/ryanair-quietly-changes-seating-policy-fo...
1•Markoff•3m ago•0 comments

Sleep Is Death was ahead of its time (2018)

https://www.eurogamer.net/sleep-is-death-was-ahead-of-its-time
1•bpierre•6m ago•0 comments

I asked Siri to team up with Claude and read me the news

https://automato.substack.com/p/siri-plus-claude-plus-shortcuts
1•andrewstetsenko•14m ago•0 comments

Temporal.io: Durable Execution Against Distributed Chaos

https://srdata.dev/en/escritos/temporal-io-orquestacion-ejecucion-durable.html
1•bastiates•14m ago•0 comments

Thoughts on the Future of Web Browsers

https://sarahjamielewis.com/log/2026/future-of-web-browsers.html
1•birdculture•17m ago•0 comments

UK to launch first licensing scheme for knife sales

https://www.theguardian.com/uk-news/2026/nov/25/uk-knife-sales-licensing-scheme
1•baal80spam•17m ago•0 comments

Peano Arithmetic cannot determine BB(173) thanks to Quine's New Foundations

https://twitter.com/ElliotGlazer/status/2126047123288322548
2•ogogmad•18m ago•0 comments

3DGS Training in <10 Seconds

https://electronicarts.github.io/perf-gs/
1•nozbufferHere•19m ago•0 comments

You are mad at AI for the wrong reasons

https://benedictide.com/posts/ai/
1•paulpauper•19m ago•0 comments

Global lake synchrony signals rising planetary-scale ecological coupling

https://www.pnas.org/doi/10.1073/pnas.2611874123
2•geox•19m ago•0 comments

Novita, StreamLake, etc. are ByteDance Ark wrappers

https://kendell.dev/blog/arkwrapper/
2•leafingensemble•22m ago•0 comments

Facebook is wrong, text is deathless (2016)

https://kottke.org/16/06/facebook-is-wrong-text-is-deathless
1•rajeev1123•23m ago•0 comments

Nvidia's 'great man theory' is flawed

https://www.ft.com/content/6a01bdc9-f242-4272-b5e3-a147af5b125c
2•bookofjoe•25m ago•1 comments

Mozilla/Firefox-MCP

https://github.com/mozilla/firefox-mcp
1•super256•27m ago•0 comments

Why is every agent orchestrator the exact same app?

https://kevinak.se/blog/3602153a-3f9c-4ce0-8a4b-fc8e0abceb4f
1•kevinak•30m ago•0 comments

"Kid in the Cockpit” (1994)

https://en.wikipedia.org/wiki/Aeroflot_Flight_593
1•abbadadda•33m ago•2 comments

Should I Buy a Gun?

https://robbiewmthompson.com/blog/buying-a-gun/
1•paulpauper•33m ago•1 comments

AI made self-hosting fun again

https://janlukas.blog/posts/ai-self-hosting
24•jlelse•34m ago•15 comments

What Is the Point of Mountains

https://wadapan.substack.com/p/all-souls-exam
1•paulpauper•34m ago•0 comments

Musk pledges to give two SpaceX shares to every child in the US

https://www.theguardian.com/technology/2026/nov/26/elon-musk-pledges-to-give-two-spacex-shares-to...
1•andsoitis•37m ago•0 comments

How will Anthropic's cashed-up employees spend their riches?

https://www.economist.com/business/2026/11/26/how-will-anthropics-cashed-up-employees-spend-their...
1•andsoitis•39m ago•0 comments

Data-First Architecture: Model Streams, State and Commands

https://aimdb.dev/blog/data-driven-design
2•sounds-like-lx•41m ago•0 comments

Ask HN: How is the current landscape of new Version Control Systems?

2•mikaelmello•41m ago•0 comments

SafeJIT: A Speculating JIT Engine Verified Down to the Machine Code

https://arxiv.org/abs/2611.28436
1•lucamark•42m ago•0 comments

Agent Harness

https://github.com/gnosh-ai/gnosh
1•jaekwon•42m ago•0 comments

Mdsvex v1.1, Markdown with Svelte in it

https://mdsvex.pngwn.at/
1•Leftium•47m ago•1 comments

Mob framework: Write mobile apps in Elixir

https://mobframework.com/
1•auraham•48m ago•0 comments

After Jensen Huang's Scandal, Top Executive Jay Puri's Affair Comes Under Fire

https://www.bollywoodshaadis.com/articles/jensen-huangs-extramarital-scandal-another-executive-ja...
4•Danhale93•49m ago•0 comments

Emacs Redux: Smarter Minibuffer Prompts in Projectile

https://emacsredux.com/blog/2026/11/26/smarter-minibuffer-prompts-in-projectile/
4•millspore•49m ago•0 comments

I Surrender

https://rafaelquintanilha.com/i-surrender/
2•rafaquintanilha•55m ago•0 comments