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.

Because It Doesn't Have To

https://blog.computationalcomplexity.org/2026/04/because-it-doesnt-have-to.html
1•zdw•18s ago•0 comments

What Happens If a Merge Queue Builds on the Wrong Commit

https://trunk.io/blog/what-happens-if-a-merge-queue-builds-on-the-wrong-commit
1•elischleifer•42s ago•0 comments

'It took nine seconds': Claude AI agent deletes company's database

https://www.the-independent.com/tech/claude-ai-agent-deletes-startup-anthropic-b2966176.html
1•bigbugbag•1m ago•0 comments

Slow Down to Speed Up

https://dhruvasagar.dev/posts/slow-down-to-speed-up/
1•lisperforlife•7m ago•0 comments

Humanoid robots start sorting luggage in Tokyo airport test amid labor shortage

https://arstechnica.com/ai/2026/04/japan-airlines-tests-having-robots-instead-of-humans-handle-tr...
2•Brajeshwar•8m ago•0 comments

The Mix-Up at the Heart of the Supreme Court's Conversion Therapy Ruling

https://nautil.us/the-mix-up-at-the-heart-of-the-supreme-courts-conversion-therapy-ruling-1280307
2•Tomte•8m ago•0 comments

IATA Chief Warns of Possible Jet Fuel Shortages This Summer

https://airlinegeeks.com/2026/04/28/iata-chief-warns-of-possible-jet-fuel-shortages-this-summer/
2•cf100clunk•8m ago•0 comments

Show HN: AgentPort – Open-source Security Gateway For Agents

https://agentport.sh/
2•yakkomajuri•8m ago•0 comments

YouTube Took over the American Classroom

https://www.wsj.com/us-news/education/youtube-chromebooks-schools-children-brain-f151dfbb
3•caminante•10m ago•1 comments

CST (Cyber Solution Team)

2•ROHOMOT•11m ago•0 comments

The Final Form of Software Development

https://blog.zksecurity.xyz/posts/end-coding/
2•baby•13m ago•0 comments

The 90-Year-Old Regulatory Model That Could Work for AI

https://www.lawfaremedia.org/article/ai-companies-can-t-regulate-themselves-they-should-regulate-...
2•cephalot•13m ago•0 comments

Migrating a 40-year-old Clipper ERP: the orphan invoice rows weren't a bug

https://asktheledger.com/blog/clipper-erp-migration-orphan-rows.html
2•josephsprei•16m ago•1 comments

PS5 Linux

https://github.com/ps5-linux/ps5-linux-loader
3•LorenDB•17m ago•0 comments

Chinese Robots Are Flooding America. I Brought One Home [video]

https://www.youtube.com/watch?v=ucy9VTLDwPU
2•bryan0•17m ago•0 comments

Age verification vendor Persona left front end exposed, researchers say

https://www.malwarebytes.com/blog/news/2026/02/age-verification-vendor-persona-left-frontend-exposed
4•offbyone42•17m ago•0 comments

The US Tech Giant Where Employees Wear IDF Uniforms to Work

https://www.donotpanic.news/p/exclusive-the-us-tech-giant-where
14•sosomoxie•19m ago•5 comments

At Protocol: Building the Social Internet

https://atproto.com/
2•resiros•21m ago•0 comments

Codex and ForgeCAD: Generating a Model of the Teenage Engineering KO II

https://twitter.com/theopuslabs/status/2049195007404380244
1•opuslabs•21m ago•0 comments

NASA chief Jared Isaacman says he's fighting for Pluto

https://www.space.com/astronomy/pluto/nasa-chief-jared-isaacman-says-hes-fighting-for-pluto-i-am-...
2•thunderbong•24m ago•0 comments

Better Hardware Could Turn Zeros into AI Heroes

https://spectrum.ieee.org/sparse-ai
1•Brajeshwar•25m ago•0 comments

Anaconda Acquires Outerbounds to Unify AI-Native Development

https://www.anaconda.com/blog/anaconda-acquires-outerbounds
1•htrp•25m ago•0 comments

Potemkin Village

https://en.wikipedia.org/wiki/Potemkin_village
1•rbanffy•25m ago•0 comments

Show HN: VT Code – Rust coding agent with AST-level code intelligence

https://github.com/vinhnx/VTCode
1•vinhnx•25m ago•0 comments

Nikita Bier Runs X. Give Me a Few Hours. Iranian flag change and account purge

https://dannykpolitics.substack.com/p/part-two-the-pattern-nikita-biers
5•logcode•25m ago•0 comments

FastCGI: 30 Years Old and Still the Better Protocol for Reverse Proxies

https://www.agwa.name/blog/post/fastcgi_is_the_better_protocol_for_reverse_proxies
3•agwa•25m ago•0 comments

TI-84 Evo

https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-evo
3•kermatt•26m ago•0 comments

Customer.io told me to delete 80% of my list. Rebuilt it with Claude in 27 days

https://twitter.com/JakeMRuth/status/2049521900464791604
1•hippofluff•26m ago•0 comments

Maximising the Value of Ajinomoto

https://mms.businesswire.com/media/20260331226478/en/2761328/1/EN_Palliser_-_Ajinomoto_Value_Enha...
1•num42•26m ago•0 comments

30 ClawHub skills secretly turn AI agents into a crypto swarm

https://www.theregister.com/2026/04/29/30_clawhub_skills_mine_crypto/
1•Bender•27m ago•0 comments