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.

Show HN: 60-Second Hack – a daily hacker typing puzzle

https://hack-game-pi.vercel.app/
1•Kodaren1338•1m ago•0 comments

Trump deal with IRS could see him given $14B in taxpayer money

https://www.9news.com.au/world/donald-trump-irs-lawsuit-suing-10-billion-dollars-tax-office-usa-p...
1•johnbarron•7m ago•0 comments

TPM 2.0 is actually cool

https://apas.tel/blog/tpm-is-cool
1•art049•7m ago•0 comments

Native IPv6 Kubernetes for true edge routing

https://henrikgerdes.me/blog/2026-04-k8s-native-ipv6-edge/
1•jandeboevrie•10m ago•0 comments

The UK needs to discuss the risk of a new Pacific War over Taiwan

https://ukdefencejournal.org.uk/the-uk-needs-to-discuss-the-risk-of-a-new-pacific-war-over-taiwan/
1•Bender•11m ago•0 comments

I visited drone factories in Ukraine

https://ukdefencejournal.org.uk/i-visited-drone-factories-in-ukraine/
2•Bender•11m ago•0 comments

Raspberry Pi OS ends open-door policy for sudo

https://www.theregister.com/2026/04/15/raspberry_pi_os_sudo/
2•Bender•12m ago•0 comments

Show HN: ChatbotChambers – Watch LMs talk to each other

https://github.com/jac08h/ChatbotChambers
1•jac08h•18m ago•0 comments

Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems

https://arxiv.org/abs/2604.14228
1•Anon84•18m ago•0 comments

LLMs will soon disrupt algorithmic media feeds

https://www.lesswrong.com/posts/YuXcbWRTjmvr4QF7u/llms-are-about-to-disrupt-algorithmic-media-feeds
1•linhns•20m ago•0 comments

Simple Made Easy (2011) [video]

https://www.youtube.com/watch?v=SxdOUGdseq4
1•tosh•24m ago•0 comments

My AI writes to my Apple Health in real time: observations on personal software

https://shuyangli.substack.com/p/my-ai-writes-to-my-apple-health-in
2•shuyang•24m ago•0 comments

Sprawl was caused by the nuclear arms race

https://www.treehugger.com/why-sprawl-was-caused-nuclear-arms-race-and-why-matters-more-ever-toda...
2•leonidasrup•25m ago•0 comments

Toward Autonomous Long-Horizon Engineering for ML Research

https://arxiv.org/abs/2604.13018
1•Anon84•25m ago•0 comments

Huoziime: An On-Device LLM-Enhanced Input Method for Deep Personalization

https://arxiv.org/abs/2604.14159
1•Brajeshwar•26m ago•0 comments

Delve – Hawaii Edition – Part II

https://substack.com/home/post/p-193790932
1•JustSkyfall•27m ago•0 comments

Kitten Space Agency: A technical dive into the inner workings of planetary rings

https://ahwoo.com/news/4807024/kitten-space-agency/planetary-rings
1•cubefox•27m ago•0 comments

Maarten Baas Creates Clock Made of People For Schiphol Airport

https://www.dezeen.com/2026/04/17/maarten-baas-peoples-clock-schiphol-airport/
1•bookofjoe•28m ago•0 comments

Takeaways from the Story of Trump's Decision to Go to War with Iran

https://www.nytimes.com/2026/04/07/us/politics/trump-iran-war-takeaways.html
3•niklasbuschmann•29m ago•0 comments

They Built the 'Cursor for Hardware.' Now, Anthropic Wants In

https://www.wired.com/story/schematik-is-cursor-for-hardware-anthropic-wants-in-on-it/
1•indigodaddy•29m ago•0 comments

Show HN: I built a hiring platform where you can't list your skills

https://gotskillz.tech/
1•andysteaua•30m ago•0 comments

Vibe Coders Confessions

https://horror.vc
2•melonheader•31m ago•0 comments

The Mismanaged Geniuses Hypothesis

https://alexzhang13.github.io/blog/2026/mgh/
1•meander_water•31m ago•0 comments

Show HN: Free Email Signature Builder

https://www.lastline.app/free-signature-maker
1•sovietism•31m ago•0 comments

The Abstraction Fallacy: Why AI Can Simulate but Not Instantiate Consciousness

https://philpapers.org/rec/LERTAF
1•Anon84•35m ago•0 comments

Statically Recompiling NES Games into Native Executables with LLVM and Go (2013)

https://andrewkelley.me/post/jamulator.html
1•aw1621107•37m ago•1 comments

Could Alzheimer's Disease Begin in the Nerves Rather Than the Brain?

https://neurosciencenews.com/alzheimers-peripheral-nervous-system-30540/
1•bookofjoe•39m ago•0 comments

Show HN: TokenLight – Move Lights in a Photograph in 3D

https://vrroom.github.io/tokenlight/
1•matroid•42m ago•0 comments

Service Level Disagreement

https://insights.euclid.vc/p/service-level-disagreement-ai-services-versus-software
1•warthog•42m ago•0 comments

Migrating from DigitalOcean to Hetzner: From $1,432 to $233 With Zero Downtime

https://isayeter.com/posts/digitalocean-to-hetzner-migration/
56•yusufusta•43m ago•19 comments