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.

KeePassChi – Codeberg.org

https://codeberg.org/keepasschi
1•sharjeelsayed•44s ago•0 comments

Elon Musk buys a fifth of his own Cybertrucks

https://www.msn.com/en-us/money/companies/elon-musk-buys-a-fifth-of-his-own-cybertrucks/ar-AA212Sci
2•petethomas•1m ago•0 comments

We're Hooked on Satellites. It Could Blow Up in Our Faces

https://www.cnet.com/science/space/features/satellite-overcrowding-space-junk-low-earth-orbit-sta...
2•SilverElfin•1m ago•0 comments

Filling DOCX forms: GPT-5.1 broke it, every Claude model handled it

https://varstatt.com/jurij/p/filling-forms-no-tool-can-template
1•jurijtokarski•2m ago•0 comments

Lutnick's old firm pumps $10M into super PAC led by Tether executive

https://www.citationneeded.news/commerce-secretary-howard-lutnicks-old-firm-pumps-10-million-into...
3•petethomas•3m ago•1 comments

US, EU move toward landmark biometric data sharing deal

https://www.biometricupdate.com/202603/us-eu-move-toward-landmark-biometric-data-sharing-deal
1•peq42•3m ago•0 comments

A privacy-first QR code generator (100% client-side, PNG and SVG export)

https://atomnyx.com/tools/qr-code-generator
1•RuBekOn•4m ago•0 comments

TCode: An AI Coding Agent Leverages Neovim and Tmux

https://www.binwang.me/2026-04-12-TCode-An-AI-Coding-Agent-Leverages-Neovim-and-Tmux.html
1•wb14123•4m ago•0 comments

Reed Hastings to Step Down as Netflix Chair

https://www.nytimes.com/2026/04/16/business/media/reed-hastings-netflix-chair.html
1•psychanarch•4m ago•0 comments

Frontier Coding Agents Built a Video Diffusion Pipeline on Max

https://www.modular.com/blog/how-frontier-coding-agents-built-a-video-diffusion-pipeline-on-max
1•visheshdembla•5m ago•0 comments

Scientists Just Created Super-Strong Steel That Never Rusts

https://www.popularmechanics.com/science/green-tech/a70977124/3d-printed-steel/
2•bookofjoe•6m ago•1 comments

The Beginning of Scarcity in AI

https://tomtunguz.com/ai-compute-crisis-2026/
2•gmays•10m ago•0 comments

Mechanical Sympathy

https://vickiboykis.com/2026/04/13/mechanical-sympathy/
1•sebg•10m ago•0 comments

Neuromorphic Event-Based Camera Achieves Kilohertz Vascular Imaging

https://bioengineer.org/neuromorphic-event-based-camera-achieves-kilohertz-vascular-imaging-and-f...
2•geox•11m ago•0 comments

Accelerate building an independent European social web

https://fund.eurosky.tech/https://whydonate.com/en/fundraising/AcceleratebuildinganindependentEur...
1•doener•13m ago•0 comments

Packrat Parsing at the Speed of Wasm [video]

https://www.youtube.com/watch?v=C2QxWtqlq9E
1•matt_d•15m ago•0 comments

Has New Music Become Less Popular?

https://www.statsignificant.com/p/has-new-music-become-less-popular
1•dpee123•16m ago•0 comments

Let sleeping CPUs lie: S0ix

https://freebsdfoundation.org/our-work/journal/browser-based-edition/laptop-desktop/let-sleeping-...
1•fanf2•17m ago•0 comments

JavaScript Promise.all() and Promise.allSettled() in Practice

https://www.jamdesk.com/blog/javascript-promise-all
1•gbourne1•19m ago•0 comments

GitHub Copilot Chat 0.44.1 – Possible Malicious Release

2•warhorse10_9•21m ago•0 comments

We Took $10k from MKBHD's Locked iPhone

https://twitter.com/veritasium/status/2044466849308414117
1•apparent•21m ago•1 comments

Changing leafcutter ants' food reshapes their microbial gardens, scientists find

https://phys.org/news/2026-03-leafcutter-ants-food-reshapes-microbial.html
1•PaulHoule•21m ago•0 comments

Sweden's schools cutting back on digital learning

https://www.bbc.com/news/articles/cly0vk77vdko
1•bidikburger•25m ago•1 comments

Ask HN: Why Hasn't Clojure Caught On?

4•uxcolumbo•25m ago•4 comments

Estimating π with a Coin

https://arxiv.org/abs/2602.14487
1•sebg•26m ago•0 comments

Show HN: King Louie a desktop AI with 20 agent tools, no cloud required

https://github.com/the-banana-tool/king-louie
1•sethito•27m ago•1 comments

The "Passive Income" trap ate a generation of entrepreneurs

https://www.joanwestenberg.com/the-passive-income-trap-ate-a-generation-of-entrepreneurs/
9•devonnull•28m ago•2 comments

Timeplus Released AgentGuard – Real-Time Security Detection for AI Agents

https://www.timeplus.com/post/agentguard
1•gangtao•28m ago•0 comments

The Rise of Marketing Speak

https://sustainableviews.substack.com/p/the-rise-of-marketing-speak
1•rzk•29m ago•0 comments

Break Bricks on Any Webpage

https://github.com/canalun/brick-break-anywhere
1•indigodaddy•29m ago•0 comments