frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Avoid Continue

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

Comments

zoezoezoezoe•1y 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•1y 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.

One Small Bug

https://nesbitt.io/2026/10/23/one-small-bug.html
1•robin_reala•46s ago•0 comments

Tell HN: Steamcmd doesn't work on Apple Silicon

1•stdc105•3m ago•0 comments

Go Time Patterns for Agent Scheduling

https://cheikhhseck.medium.com/10-go-time-patterns-for-agent-scheduling-8e0b64dffb5e
1•cheikhdev•4m ago•1 comments

Brotli vulnerability affects curl and Git

https://github.com/advisories/GHSA-9v8h-qqgm-4m35
1•bmitch3020•5m ago•1 comments

Show HN: LeakLock – Gitleaks for your live site(finds keys with no known format)

https://github.com/sgroy10/Leaklock
1•sgroy10•5m ago•0 comments

Alaska's Senate Race Could Be Decided by Salmon

https://www.newyorker.com/news/the-political-scene/alaskas-senate-race-could-be-decided-by-salmon
1•littlexsparkee•7m ago•0 comments

CTG – IT Consulting and Digital Transformation Services

1•jamesmithctg•9m ago•0 comments

Is this the new cyber normal?

https://drew.silcock.dev/blog/is-this-the-new-cyber-normal/
2•drewsberry•11m ago•0 comments

Capitalists Don't Take on "Risk," Workers Do

https://www.currentaffairs.org/news/capitalists-dont-take-on-risk-workers-do
2•robtherobber•12m ago•0 comments

Living House: Adaptive UI and docs using in-browser inference

https://passo.uno/adaptive-ui-docs-using-llms/
1•theletterf•13m ago•0 comments

Chrome now warns before unencrypted HTTP connections

https://blog.google/security/chrome-now-warns-before-insecure-http-connections/
1•jhalderm•13m ago•0 comments

Disgraced eMudhra drops out of TLS business after using cert private key of 4

https://arstechnica.com/security/2026/10/disgraced-emudhra-drops-out-of-tls-business-following-ce...
1•joozio•13m ago•0 comments

How Much Damage Do Fake Shops Cause?

https://nebty-id.com/en/doppelcart-fake-shop-economics/
1•benny_s•15m ago•0 comments

No Need for Retirement When Utopia Is Around the Corner

https://blog.jim-nielsen.com/2026/skip-retirement-for-utopia/
2•speckx•17m ago•0 comments

Black Mirror: Be Right Back

https://www.howclosetoblackmirror.com/be-right-back
1•beatthatflight•19m ago•0 comments

Steam Next Fest Has Become a Disaster and a Grim Look at the Future

https://kotaku.com/steam-next-fest-has-become-a-massive-disaster-and-a-grim-look-at-the-future-20...
1•natebc•21m ago•0 comments

Three Rights of the Image

https://medium.com/@smoking2man/three-rights-of-the-image-how-the-visual-takes-possession-of-real...
1•Aldus551•22m ago•0 comments

Agentic Testing: Where Agents Fit in the E2E Testing Stack

https://slack.engineering/agentic-testing-where-agents-fit-in-the-e2e-testing-stack/
1•ankitg12•22m ago•1 comments

EL2 hypervisor and toolchain that boots macOS on the Snapdragon X2 Elite

https://github.com/Snapintosh/Snapintosh
1•hard_times•22m ago•0 comments

OpenAI's Ad Pixel Tracks by Default, and European Shops Aren't Switching It Off

https://ciphercue.com/blog/openai-chatgpt-ad-pixel-european-shops
2•adulion•23m ago•0 comments

Run AI prompts in any app from your menubar

https://www.snippetbar.com
1•martin_rariga•23m ago•0 comments

Is anybody still coding in PHP?

1•cfarre•24m ago•2 comments

Farewell, BioWare: The End of an RPG Giant

https://gardinerbryant.com/farewell-bioware-the-end-of-an-rpg-giant/
2•speckx•28m ago•0 comments

I get 215 GitHub notifications a day, so I built a bot to triage them

https://paolino.me/copilot-triage/
1•earcar•28m ago•0 comments

Ask HN: Qualcomm Atheros driver issues on Linux firmware?

1•coffeebar•29m ago•0 comments

Snapchat Now Supports PlayCanvas Games

https://blog.playcanvas.com/snapchat-now-supports-playcanvas-games/
1•ovenchips•31m ago•0 comments

Show HN: Orbit – A local macOS workspace for side projects

https://orbitdesktop.com/
1•capten_masin•32m ago•0 comments

Dutch government had hacked into Jared Kushner's phone

https://twitter.com/jaredkushner/status/2113376217415958767
18•teekert•34m ago•5 comments

Agent management is people management?

https://www.youtube.com/watch?v=VcIlkaI0mUk
1•claudiacsf•37m ago•1 comments

Show HN: Best otaku AI to chat about Anime with

https://otaku.animearray.site/
3•anitroves•39m ago•2 comments