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.

BofA Warns Investors Should Take Profits Now in US Equities

https://catenaa.com/markets/equities/bofa-warns-investors-should-take-profits-now-in-us-equities/
1•NewsCatenaa•58s ago•1 comments

CLAW.md – open format for agentic cron jobs

https://clor.com/blog/claws-md-open-format-for-agentic-cron-jobs
1•jacobgold•1m ago•0 comments

How Japan Stopped Civil War

https://www.worksinprogress.news/p/how-japan-stopped-civil-war
1•gaws•2m ago•0 comments

Ok computer: Rare folk instruments and lost melodies find a digital future

https://www.euronews.com/culture/2026/05/16/ok-computer-rare-folk-instruments-and-lost-melodies-f...
1•mooreds•3m ago•0 comments

92-year-old receives UK-first robotic cancer treatment

https://www.leedsth.nhs.uk/news/92-year-old-becomes-first-patient-to-receive-uk-first-robotic-can...
1•thunderbong•4m ago•0 comments

Stop Eating Lady Gaga's Oreos

https://www.experimental-history.com/p/stop-eating-lady-gagas-oreos
1•paulpauper•4m ago•0 comments

Versioned Late Materialization for Recommendation System Training

https://arxiv.org/abs/2604.24806
1•PaulHoule•5m ago•0 comments

I gave birth in South Korea and I'm lowkey traumatized

https://emilyballesteros.substack.com/p/i-gave-birth-in-south-korea-and-im
1•paulpauper•5m ago•0 comments

Those new service sector jobs

https://www.nytimes.com/2026/06/07/travel/accessible-tree-climbing-oregon.html
1•paulpauper•6m ago•1 comments

Yann LeCun: World Models: Enabling the Next AI Revolution [video]

https://www.youtube.com/watch?v=72Xj8k5WQX4
2•simonpure•6m ago•0 comments

Agentic RL: Token-In, Token-Out Done Right

https://qgallouedec-tito.hf.space/http://localhost:4321/
1•gmays•6m ago•0 comments

Claude Ledger – local cost/ROI dashboard for Claude Code usage

https://github.com/BMapAI/claude-ledger
1•itsopi•9m ago•0 comments

Cohere North Mini Code 30B Moe Apache 2.0

https://cohere.com/blog/north-mini-code
1•jeromechoo•10m ago•0 comments

Show HN: Nodea, an open-source AI canvas for working through complex projects

https://nodea.ai/demo
1•ElliottCrosby•13m ago•0 comments

Weird Design Choices in Hpack Strings

https://kallus.org/blog_hpack_string.html
1•bkallus•15m ago•0 comments

Claude Fable 5

https://twitter.com/claudeai/status/2064394146916229443
2•s-xyz•15m ago•0 comments

RNG: Flat Datacenter Networks at Amazon

https://arxiv.org/abs/2604.15261
1•fanf2•15m ago•0 comments

Show HN: Lore – LLM proxy for coding agent context and memory management

https://withlore.ai/
2•BYK•16m ago•0 comments

Claude Fable is a myth, just like new iPhone releases

1•gsunshinel•16m ago•1 comments

Broadcom 20GW Strategic AI Platform Raises $35 Billion From Apollo

https://investors.broadcom.com/news-releases/news-release-details/broadcom-apollo-and-blackstone-...
1•vijayr02•17m ago•0 comments

Show HN: Get your website roasted within a week

https://shitfa.st
1•R4FKEN•17m ago•0 comments

A Love Story

https://pudding.cool/2026/06/love-story/
2•usrme•18m ago•0 comments

Ask HN: Is Capafy.ai Legit?

1•ar27111994•18m ago•0 comments

Who's the Smartest Corvid?

https://thetyee.ca/Culture/2026/06/05/Whos-the-Smartest-Corvid/
2•NaOH•20m ago•0 comments

Show HN: Joka.work – AI-native ticketmaxxing to replace Jira in the agentic era

https://joka.work
1•natyoung•22m ago•0 comments

Snake (self aware) – Built by Claude

https://snake-stable-build.netlify.app
1•kesor•22m ago•1 comments

Show HN: I built a social-first search(X, Reddit, TikTok) cause Google is boring

https://www.bluhe.ai/
3•Dhavidh•23m ago•1 comments

Human-Near-the-Loop

https://trilogyai.substack.com/p/human-near-the-loop
2•jeffbarr•24m ago•0 comments

How Elon Musk Killed Hundreds of Thousands of People

https://www.currentaffairs.org/news/how-elon-musk-killed-hundreds-of-thousands-of-people
5•tastyface•25m ago•0 comments

Claude Fable Is Out

https://twitter.com/StefanW/status/2064399946648846505
2•swolpers•25m ago•0 comments