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.

I built an AI data extraction engine and E2E encrypted SMS router in Rust

1•adibite•54s ago•0 comments

Tree Calculus

https://treecalcul.us/
1•tosh•1m ago•0 comments

Show HN: European alternatives to Google, Apple, Dropbox and 120 US apps

https://only-eu.eu/en/
2•madman_dev•6m ago•0 comments

NHS staff refusing to use FDP over Palantir ethical concerns

https://www.freevacy.com/news/financial-times/nhs-staff-refusing-to-use-fdp-over-palantir-ethical...
1•chrisjj•7m ago•0 comments

April 2026 TLDR Setup for Ollama and Gemma 4 26B on a Mac mini

https://gist.github.com/greenstevester/fc49b4e60a4fef9effc79066c1033ae5
1•greenstevester•8m ago•0 comments

Design Optics with Python

https://www.optiland.org/
2•pppone•18m ago•0 comments

HarfBuzz Slug Support with WebGL

https://harfbuzz.github.io/hb-gpu-demo/
1•mcraiha•18m ago•0 comments

Show HN: Anonymous Chat Channels

https://kraa.io/kraa/trees
1•levmiseri•20m ago•2 comments

Show HN: Stashpin – Pinterest downloader for videos and boards

https://stashpin.com
1•aitooltrek-com•21m ago•0 comments

NHS staff boycott Palantir's data platform over ethical concerns

https://www.ft.com/content/dbb67083-bd1d-46e9-b196-1438d54c5795
3•macleginn•24m ago•0 comments

Show HN: Apfel – The free AI already on your Mac

https://apfel.franzai.com
3•franze•28m ago•2 comments

Catching macOS Stealers in the Wild

https://objective-see.org/blog/blog_0x88.html
1•speckx•30m ago•0 comments

Flow – Focus Deeper, Longer

https://play.google.com/store/apps/details?id=com.get.flow_app&hl=en_US
1•K_A_P•34m ago•0 comments

Gemma 4 makes local AI agents practical

https://firethering.com/gemma-4-local-ai-agents/
3•steveharing1•36m ago•0 comments

AI's fluency in other languages hides a Western worldview that can mislead users

https://theconversation.com/ais-fluency-in-other-languages-hides-a-western-worldview-that-can-mis...
6•1659447091•40m ago•0 comments

Tried to Buy a Pint, Finding a Trojan: My First Malware Analysis

https://blog.michaelrbparker.com/post/17
1•birdculture•41m ago•0 comments

A database of analog cameras that can be 3D printed

https://printed.analogcamera.space/
2•thomasjb•41m ago•0 comments

Artemis II astronaut finds two Outlook instances running on computers

https://www.tomshardware.com/software/microsoft-office/artemis-ii-astronaut-finds-two-outlook-ins...
1•doener•42m ago•1 comments

Proton Meet Isn't What They Told You It Was

https://www.sambent.com/proton-meet-isnt-what-they-told-you/
46•bundie•44m ago•5 comments

Say No to ZeroVer: Start with 1.0.0

https://blog.nytsoi.net/2026/04/03/say-no-to-zero-ver/
1•thomasjb•48m ago•0 comments

France plans missile increase in new defense push

https://www.politico.eu/article/france-eyes-huge-missile-boost-new-defense-plan-document-shows/
4•vrganj•49m ago•1 comments

Show HN: My portfolio as a working terminal (vanilla JavaScript, one HTML file)

https://dzienko.dev/
2•Brosper•54m ago•2 comments

A Giant Leap Towards an AI-Native OS: AgenticInit (April Fools)

https://os.ewe.moe/blog/202604-april-fool
1•uneven9434•57m ago•0 comments

Life gave us lemon trees

https://nothingisnotafish.substack.com/p/life-gave-us-lemon-trees
2•gaodean•57m ago•0 comments

Agent as User, a new tool to help you run agent in isolated user environment

https://github.com/AgentaaU/AaaU
1•shylockhg•58m ago•1 comments

I Made a Terminal Pager

https://theleo.zone/posts/pager/
2•speckx•1h ago•0 comments

Cute Animal Heroic Interval

https://medium.com/luminasticity/cute-animal-heroic-interval-c38d0dc84d05
1•bryanrasmussen•1h ago•0 comments

OpenHarness: Open Agent Harness

https://github.com/HKUDS/OpenHarness
2•msolujic•1h ago•0 comments

Hardware supply chain attack in the wild

https://airguide.info/europes-easa-warns-stolen-engine-parts-may-re-enter-supply-chain/
2•jackpepsi•1h ago•0 comments

Fathom: AI hallucination detection from SAE activation geometry (pre-registered)

https://zenodo.org/records/19382453
3•fathom_geo•1h ago•0 comments