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.

The Martians

https://en.wikipedia.org/wiki/The_Martians_(scientists)
1•tosh•1m ago•0 comments

We Got the Lithium-ion Battery (2024)

https://www.construction-physics.com/p/how-we-got-the-lithium-ion-battery
1•doener•1m ago•0 comments

My Quest to Solve Bitcoin's Great Mystery

https://www.nytimes.com/2026/04/08/business/bitcoin-satoshi-nakamoto-identity-adam-back.htm
1•davidgh•1m ago•0 comments

Completely Private AI

https://molebieai.com/
1•Jimmy6929•3m ago•0 comments

FormTo – Open-source, self-hosted form back end

https://github.com/lumizone/formto
1•luka5184•4m ago•0 comments

Show HN: I built a Zoom alternative with 1 command

https://sfu.mirotalk.com
1•mp85•5m ago•1 comments

Starving Genies

https://tidyfirst.substack.com/p/starving-genies
1•danebalia•8m ago•0 comments

Roc

https://www.roc-lang.org/
1•tosh•9m ago•0 comments

Struggle Against the Gods

https://firstthings.com/struggle-against-the-gods/
2•marcofloriano•11m ago•0 comments

Google adopts new stance on device fingerprinting (2025)

https://www.lewissilkin.com/insights/2025/01/16/google-adopts-new-stance-on-device-fingerprinting...
1•bellwhistle•11m ago•0 comments

All of the String Types

https://lambdalemon.gay/posts/string-types
1•g0xA52A2A•13m ago•0 comments

Škoda DuoBell – The Bike Bell Designed to Penetrate Noise-Cancelling Headphones [video]

https://www.youtube.com/watch?v=zDaVPfpQvPI
1•SockThief•13m ago•1 comments

Russia Hacked Routers to Steal Microsoft Office Tokens

https://krebsonsecurity.com/2026/04/russia-hacked-routers-to-steal-microsoft-office-tokens/
2•KnuthIsGod•14m ago•0 comments

The Building Block Economy

https://twitter.com/mitchellh/status/2041566958681014418
1•doppp•17m ago•0 comments

HappyHorse 1.0 – Turn Any Idea into AI Videos Instantly

https://happyhorse.video
1•sarkory•17m ago•0 comments

C's Biggest Mistake

https://digitalmars.com/articles/C-biggest-mistake.html
2•mhh__•20m ago•1 comments

What "Open" Means: Abliterating Gemma 4 in 24 Minutes

https://thenewguard.ai/features/abliterating-gemma-4/
1•mattezell•23m ago•0 comments

VR Undermines the Laws of the Internet

https://yadin.com/notes/vr-amends/
1•dryadin•26m ago•0 comments

The World Needs More Software Engineers

https://www.oreilly.com/radar/the-world-needs-more-software-engineers/
2•BerislavLopac•26m ago•0 comments

ELI: Programming with Arrays [pdf]

https://apl-germany.de/wp-content/uploads/2020/11/Cheng20201124EliProject.pdf
1•tosh•26m ago•0 comments

Fairwords NPM packages compromised by credential worm stealing tokens and

https://safedep.io/malicious-fairwords-npm-credential-worm/
1•birdculture•31m ago•0 comments

I've Sold Out

https://mariozechner.at/posts/2026-04-08-ive-sold-out/
5•doppp•31m ago•0 comments

Your data stack is about to get a lot more contributors

https://getcassis.com/blog/your-data-stack-is-about-to-get-a-lot-more-contributors
2•matthieu_bl•31m ago•1 comments

Lunar Gateway or Moon Direct? (2019)

https://spacenews.com/op-ed-lunar-gateway-or-moon-direct/
1•JumpCrisscross•34m ago•0 comments

Show HN: The 323, a 32-bit computer in Conway's Game of Life

https://256-32.com/computers/323
1•256_•36m ago•0 comments

Make Every Click Count with Real-Time Personalization

https://www.beaconmatch.com
1•Notorious_DAO•38m ago•0 comments

Mario and Earendil

https://lucumr.pocoo.org/2026/4/8/mario-and-earendil/
3•doppp•39m ago•0 comments

Volunteers turn a fan's recordings of 10K concerts into an online treasure trove

https://apnews.com/article/aadam-jacobs-collection-concerts-internet-archive-chicago-b1c9c4466a2d...
1•geox•41m ago•0 comments

Grokking the MariaDB test runner (MTR)

https://optimizedbyotto.com/post/grokking-mariadb-test-run-mtr/
1•mariuz•42m ago•0 comments

Apple is running out of A18 Pro chips for the MacBook Neo

https://www.tomsguide.com/computing/macbooks/macbook-neo-is-so-popular-apple-is-running-out-of-a1...
2•Lwrless•42m ago•0 comments