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.

Tokens Are the New Transistors

https://www.anantjain.xyz/posts/tokens-are-the-new-transistors
1•anant90•2m ago•0 comments

Show HN: Knotch – a hub-and-spoke voice agent

https://github.com/akshatvasisht/knotch
1•akshatvasisht•3m ago•0 comments

The Pope isn't AGI-pilled

https://www.theverge.com/ai-artificial-intelligence/937933/pope-ai-encyclical-tech-industry-react...
2•1vuio0pswjnm7•4m ago•0 comments

RNG: Flat Datacenter Networks at Scale

https://arxiv.org/abs/2604.15261
2•bschne•6m ago•0 comments

Rise of the Forward Deployed Engineer

https://newsletter.gtmengineering.ai/p/forward-deployed-engineering-101
2•alexjl1226•7m ago•1 comments

https://freeaiwebsiteaudit.com/ I built this wdyt?

2•snowbirdsong•7m ago•0 comments

Lix v0.6 – Embeddable version control system for AI agents

https://twitter.com/samuelstroschei/status/2061531328517111826
2•samuelstros•7m ago•0 comments

Walt Disney's MultiPlane Camera (1957) [video]

https://www.youtube.com/watch?v=YdHTlUGN1zw
3•imnot404•11m ago•0 comments

Alphabet to Raise $80B in Equity Capital for Al Spending

https://www.bloomberg.com/news/articles/2026-06-01/alphabet-to-raise-80-billion-in-equity-capital...
2•di•12m ago•0 comments

Bank Balance Is a Lie, and Fragmentation Is Why Nobody Can Prove It

https://heavenslive.com
2•bbenevolence•16m ago•0 comments

Information Theory for Complex Systems [pdf]

https://annas-archive.pk/md5/2f7824216767bc996173fcf234842cc2
2•gdss•17m ago•0 comments

The Filamentary Funnels That Form Stars

https://www.universetoday.com/articles/the-filamentary-funnels-that-form-stars
2•leephillips•17m ago•0 comments

NuCS vs. Choco: a pure-Python solver meets a JVM veteran

https://github.com/yangeorget/nucs/blob/main/articles/NuCS%20vs%20Choco/nucs-vs-choco.mdsummar
2•yan_georget•17m ago•0 comments

Updates to GitHub Copilot billing and plans

https://github.blog/changelog/2026-06-01-updates-to-github-copilot-billing-and-plans/
2•agluszak•17m ago•0 comments

De Maquinas Y Seres Vivos – Humberto Maturana, Francisco Varela

https://z-library.im/book/8WkmBWGpJj/de-maquinas-y-seres-vivos.html
2•gdss•18m ago•0 comments

Alphabet Announces $80B Equity Capital Raise to Expand AI Infra and Compute

https://abc.xyz/investor/news/news-details/2026/Alphabet-Announces-Proposed-80-Billion-Equity-Cap...
23•gregschlom•22m ago•11 comments

Going multi-cloud with an in-housed status page

https://blog.railway.com/p/multi-cloud-status-page
4•ndneighbor•23m ago•0 comments

What "Memory Compiler" Means: From Bitcells to GDS Tiling

https://thecloudlet.github.io/technical/compiler/memory-compiler/
3•sillysaurusx•25m ago•0 comments

A court just decided how much foot movement counts as 'pedaling' an e-bike

https://electrek.co/2026/05/31/a-court-just-decided-how-much-foot-movement-counts-as-pedaling-an-...
3•Bender•26m ago•0 comments

Verkada Publicly Disparages Major Competitors with Private Google VC Doc

https://ipvm.com/reports/verkada-nps-comp
5•jhonovich•26m ago•0 comments

Bill Maher becomes latest liberal to throw support behind Spencer Pratt

https://www.dailymail.com/media/article-15865069/bill-maher-spencer-pratt-club-random-la-los-ange...
3•Bender•26m ago•0 comments

FastStream 0.7: MQTT support – in-memory tests, AsyncAPI generation and more

https://github.com/ag2ai/faststream/releases/tag/0.7.0
3•Lancetnik•28m ago•0 comments

Red Hat packages backdoored through its offical NPM channel

https://arstechnica.com/security/2026/06/dozens-of-red-hat-packages-backdoored-through-its-offica...
3•jjbinx007•31m ago•0 comments

AI music is flooding streaming services, but who wants it?

https://www.theverge.com/column/921599/ai-music-is-flooding-streaming-services-but-who-wants-it
3•1vuio0pswjnm7•35m ago•0 comments

Show HN: Mqtt Broker for 10 Years

https://github.com/skittleson/mqtt_broker_esp
3•skittleson•35m ago•0 comments

Willis Lamm's traffic light collection

https://www.kbrhorse.net/signals/signals01.html
3•fanf2•35m ago•0 comments

My 15-year-old relative was killed for refusing to marry her cousin

https://www.theguardian.com/global-development/2026/jun/01/kawthar-al-husayjawi-killed-refusing-f...
30•Anon84•36m ago•6 comments

Florida Sues OpenAI over Chatbot Safety Concerns

https://www.nytimes.com/2026/06/01/technology/florida-sues-openai-chatgpt-safety.html
3•1vuio0pswjnm7•36m ago•1 comments

Open Source Initiative Helps G7 Deliver Vision on AI Openness

https://opensource.org/blog/open-source-initiative-helps-g7-deliver-vision-on-ai-openness
2•jomaris•37m ago•1 comments

Debug Project

https://debug.com/
16•Eridanus2•37m ago•1 comments