frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•11mo ago

Comments

zoezoezoezoe•11mo 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•11mo 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.

Apple have begun bricking my phone

1•stevelini•4m ago•1 comments

Modern Loki – C++20 port of Alexandrescu's design patterns library

https://github.com/skillman1337/modern-loki
1•skillman1337•4m ago•0 comments

Grieving Parents in Iran Spend Night at Children Graves, Killed by U.S. Strike

https://www.dropsitenews.com/p/minab-iran-elementary-school-airstrike-cemetery-families
2•orsenthil•6m ago•0 comments

Major outgoing CEOs are citing AI as a factor in their decisions to step down

https://www.cnbc.com/2026/03/26/coca-cola-james-quincey-walmart-doug-mcmillon-artificial-intellig...
1•cebert•6m ago•0 comments

How I setup Azure for new software projects

https://www.processfoundry.io/insights/how-i-setup-azure-to-deploy-microservices
1•christian-scott•11m ago•0 comments

HN: Claud-y – an animated desktop companion that reacts to your coding sessions

https://github.com/eali959/claudy/releases/tag/v1.0.0
1•ealiii•18m ago•0 comments

A Field‑Grade Architecture for the Next Century of Energy and Infrastructure"

https://wes-core-grid.base44.app
1•wesley-Alan•18m ago•0 comments

The Prompt Is the Program

https://aifoc.us/prompt-is-the-program/
1•kinlan•20m ago•0 comments

Show HN: Systems and complex questions into VSM maps and diagnostic hypotheses

https://recursive.systems/
1•rgunther•23m ago•0 comments

How the illegal market for buying and selling personal data on Telegram works

https://english.elpais.com/international/women-leaders-of-latin-america/2026-03-27/this-is-how-th...
1•c420•24m ago•0 comments

Klode has been systematically stripping features from GRUB since 2021

https://www.sambent.com/canonicals-grub-saboteur-has-a-10-year-plan/
1•felineflock•29m ago•1 comments

Speech on the situation in the Near and Middle East [video]

https://www.youtube.com/watch?v=FXPD6bjrlXg
1•hkhn•30m ago•0 comments

Going Founder Mode on Cancer

https://centuryofbio.com/p/sid
1•nextos•30m ago•1 comments

Tribe v2:A Foundation Model for How the Human Brain Processes Complex Stimuli

https://ai.meta.com/blog/tribe-v2-brain-predictive-foundation-model/?_fb_noscript=1
2•justaregulardev•30m ago•0 comments

The theory and practice of plug-in solar

https://pv-magazine-usa.com/2026/03/27/the-theory-and-practice-of-plug-in-solar/
1•jer0me•39m ago•0 comments

Domer AI – Free AI Video Generator – Text and Image to Video

https://domer.io/
2•duanhjlt•42m ago•1 comments

With Less Immigration, Urban Growth Slowed in 2025

https://substack.com/home/post/p-192182908
1•NomNew•44m ago•0 comments

Anthropic accidentally leaked details of a new AI model

https://fortune.com/2026/03/27/anthropic-leaked-ai-mythos-cybersecurity-risk/
1•ilkkao•46m ago•0 comments

There's a Good Reason You Can't Concentrate

https://www.nytimes.com/2026/03/27/opinion/technology-mental-fitness-cognitive.html
1•james_r12•49m ago•1 comments

Cherri – programming language that compiles directly to a Apple Shortuct

https://github.com/electrikmilk/cherri
4•mihau•54m ago•0 comments

Supply Chain Attacks

https://ozair.dev/b/on-supply-chain-attacks/
2•ozzzzzzz•57m ago•0 comments

They booked a flight – and got a bus

https://www.washingtonpost.com/travel/2026/03/26/american-airlines-flight-bus-ride/
3•bookofjoe•1h ago•1 comments

Help Wanted: Porting GNUtrition to Python 3 and WxPython

https://lists.gnu.org/archive/html/gnutrition-devel/2026-03/msg00000.html
3•amcclure•1h ago•0 comments

Incus vs. Kubernetes: Why Simplicity Wins

https://pieterbakker.com/incus-vs-kubernetes-simplicity/
4•neitsab•1h ago•0 comments

Show HN: CEETEX – A Ceefax/Teletext-style terminal RSS reader

https://github.com/ViciousSquid/CEETEX
1•vicioussquid•1h ago•0 comments

AutoRocq: Agentic Theorem Prover for Verification

https://github.com/NUS-Program-Verification/AutoRocq
2•matt_d•1h ago•0 comments

Detecting camera on/off events for Linux and controlling lights with eBPF

https://shuhaowu.com/blog/2026/02-camera-coordinator.html
2•pwnna•1h ago•0 comments

Microsoft Set for Worst Quarter Since 2008 as AI Fears Converge

https://finance.yahoo.com/news/microsoft-set-worst-quarter-since-103556906.html
5•cebert•1h ago•0 comments

Codex-review – Claude Code plugin for Codex reviews of plans and implementations

https://github.com/boyand/codex-review
2•nathariel_•1h ago•0 comments

Show HN: Hollow – serverless web perception for AI agents

https://artiqal.vercel.app/hollow
2•LahanF•1h ago•0 comments