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•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.

Show HN: CoreMem – Portable context for AI agents

https://coremem.app
1•20wenty•15s ago•0 comments

2-time NASCAR champ Kyle Busch dies at 41 after a 'severe illness'

https://www.washingtonpost.com/sports/auto-racing/2026/05/21/nascar-kyle-busch-hospitalized/bb0c5...
1•bookofjoe•20s ago•0 comments

Phind.com has shut down completely

https://old.reddit.com/r/LocalLLaMA/comments/1qfbt9f/local_replacement_for_phindcom/
3•behnamoh•4m ago•0 comments

Seven days of fasting transforms the human body

https://www.sciencedaily.com/releases/2026/05/260517030404.htm
1•ketanmaheshwari•5m ago•0 comments

Vulnerabilities in various GTK-based PDF readers

https://lwn.net/Articles/1073944/
2•Brajeshwar•5m ago•0 comments

Tulsi Gabbard resigns as US director of national intelligence

https://www.bbc.com/news/articles/cvgj2gkv1x1o
3•thm•7m ago•0 comments

Cartesia's Sonic-3.5 Takes #1 on Artificial Analysis Speech Leaderboard

https://artificialanalysis.ai/text-to-speech/leaderboard
1•ganeshmm•7m ago•0 comments

Commencement Speeches

https://apps.npr.org/commencement/
1•gcanyon•8m ago•0 comments

Thinking in an Array Language

https://github.com/razetime/ngn-k-tutorial/blob/main/12-thinking-in-k.md
3•tosh•9m ago•0 comments

Sundar Pichai discusses AI search

https://www.nytimes.com/2026/05/22/podcasts/sundar-pichai-understands-why-people-are-anxious-abou...
2•garyrob•11m ago•0 comments

Bumblebee: Read-only supply-chain inventory for macOS/Linux dev machines.

https://github.com/perplexityai/bumblebee
1•georgehill•12m ago•0 comments

Interim Install Guide: KDE Neon for a professional digital painter workstation

https://www.davidrevoy.com/article1145/interim-install-guide-kde-neon-user-edition-for-a-professi...
2•Tomte•14m ago•0 comments

Immigrants waiting for a Green Card must return to their home country to apply

https://twitter.com/DHSgov/status/2057817233200418837
2•freddier•14m ago•0 comments

AVX-512 and Validating Usage on AMD EPYC

https://www.amd.com/en/blogs/2026/understanding-avx-512---validating-usage-on-amd-epyc-.html
1•tosh•14m ago•0 comments

Canada's shortwave radio time standard station CHU to go dark June 22nd

https://nrc.canada.ca/en/certifications-evaluations-standards/canadas-official-time/nrc-shortwave...
1•joe_bleau•16m ago•0 comments

Kash Patel merch site hacked to trick users into installing malware

https://san.com/cc/kash-patels-personal-merch-site-hacked-to-trick-users-into-installing-malware/
4•impish9208•19m ago•1 comments

India's quiet redrawing of research integrity's accountability chain

https://www.researchinformation.info/analysis-opinion/indias-quiet-redrawing-of-research-integrit...
1•rustoo•20m ago•0 comments

Lattice: Grid-based space navigation for macOS

https://github.com/bryancostanich/lattice
2•keithba•20m ago•1 comments

Microsoft Drops Claude Code After Budget Overrun

https://aiweekly.co/alerts/microsoft-drops-claude-code-after-budget-overrun
38•robertkarl•20m ago•9 comments

TorQ: Kdb+ Production Framework

https://github.com/DataIntellectTech/TorQ
1•tosh•21m ago•0 comments

API to fix telemetry pathologies and calculate invariant proxies

https://dashboard.render.com/web/srv-d888rk8g4nts73et5fv0/deploys/dep-d888rkog4nts73et5ghg?r=2026...
1•Oliviana•21m ago•0 comments

CRTC to require streamers pay 15% of annual rev to support Canadian content

https://nationalpost.com/news/crtc-to-require-online-streamers-to-pay-15-of-annual-revenues-to-su...
1•fidotron•22m ago•0 comments

Why Ruby Still Feels Like Home After All These Years

https://caio.ca/blog/why-ruby-still-feels-like-home
3•birdculture•23m ago•0 comments

Alleged Kimwolf Botmaster 'Dort' Arrested, Charged in U.S. and Canada

https://krebsonsecurity.com/2026/05/alleged-kimwolf-botmaster-dort-arrested-charged-in-u-s-and-ca...
2•Brajeshwar•24m ago•0 comments

India has food safety laws. So why can't it guarantee safe food?

https://www.bbc.com/news/articles/c232mjxpx8no
1•rustoo•25m ago•0 comments

CBS Radio signs off after nearly 100 years of broadcasting

https://www.cbsnews.com/news/cbs-news-radio-last-day/
1•gscott•26m ago•0 comments

Venmo Takes Privacy Seriously

https://www.theverge.com/tech/927503/venmo-app-redesign-privacy-posts
1•TMWNN•26m ago•0 comments

Designing Firefox for the Future

https://blog.mozilla.org/en/firefox/new-firefox-design/
2•ohtz•27m ago•0 comments

Yt-dlp – [Announcement] Bun support is now limited and deprecated

https://github.com/yt-dlp/yt-dlp/issues/16766
2•tamnd•28m ago•0 comments

A Technical Deep Dive into the New Raycast

https://www.raycast.com/blog/a-technical-deep-dive-into-the-new-raycast
1•CharlesW•28m ago•0 comments