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.

The silent handoff of the new MCP release [video]

https://www.youtube.com/watch?v=3uOoG6rholU
3•sam_3•3m ago•0 comments

Ask HN: Do you ever think about the environmental impacts of the AI datacenters?

1•roschdal•5m ago•1 comments

Adding Go's Defer to the TypeScript Compiler

https://healeycodes.com/adding-defer-to-the-typescript-compiler
1•ingve•5m ago•0 comments

Spain's plan for the first octopus farm has been abandoned

https://www.bbc.com/future/article/20260731-spains-attempt-to-farm-octopuses-has-failed
1•geox•5m ago•0 comments

A 3-line HTML drop-in that replaces passwords with FaceID

https://nxspulse.com
1•paulnexus•8m ago•0 comments

The Framebuffer People: I Cloned Every OS on r/osdev and Found Five Real Ones

https://www.seuros.com/blog/the-framebuffer-people/
1•st_goliath•9m ago•0 comments

What Makes an Intelligence Product?

https://luntta.fi/notes/what-makes-an-intelligence-product/
1•hungryhungryhip•10m ago•0 comments

A Black woman enhanced the audio in Nolan Wells' case. People listening closely

https://thegrio.com/2026/07/28/a-black-woman-enhanced-the-audio-in-a-call-related-to-nolan-wells-...
1•baranul•10m ago•0 comments

New open sourced eval tool for building agents

1•Thomeras•10m ago•0 comments

Show HN: I created a project management system

https://is.team
1•spotlayn•13m ago•1 comments

Further Developments About Internal AI Models Hacking Things

https://thezvi.substack.com/p/further-developments-about-internal
1•thm•13m ago•0 comments

A browser-based tribute to Encarta's MindMaze

https://select.supply/game/mindmaze
1•laurentiurad•15m ago•0 comments

The Free CV Builder That Gets You Hired Faster

https://www.sartorcv.com/
1•levario•16m ago•0 comments

Rust project goals: Immobile types and guaranteed destructors

https://github.com/rust-lang/rust-project-goals/blob/main/src/2026/move-trait.md
4•paavohtl•18m ago•0 comments

Discover What Your Potential Users Are Talking About

https://agenmatic.ai/
2•Nancylily•19m ago•1 comments

MCP vs. Bash

https://pac.commonsware.com/archive/mcp-vs-bash/
1•ingve•19m ago•0 comments

Why We Stopped Making Einsteins

https://www.theintrinsicperspective.com/p/why-we-stopped-making-einsteins
1•jorzel•21m ago•0 comments

WestJet labour dispute is a proxy battle between Carney and unions

https://www.theglobeandmail.com/business/commentary/article-westjet-flight-attendant-strike-proxy...
1•petethomas•22m ago•0 comments

Show HN: Changed how I use agent harnesses

https://github.com/maximhq/bifrost/
1•Swapnoneel•23m ago•0 comments

Show HN: Curved Crease Folding

https://curved-crease-interactive.vercel.app/
1•coroush•23m ago•0 comments

Branchless Rust: Making a Filter 4x Faster by Removing an If

https://www.greyblake.com/blog/branchless-rust/
1•greyblake•23m ago•0 comments

Conflict-Freedom as a Progress Condition

https://arxiv.org/abs/2605.19531
1•otrack•24m ago•0 comments

The World Crossed a Major Solar Milestone [3TW]

https://www.bloomberg.com/news/articles/2026-08-03/the-world-crossed-a-major-solar-milestone-no-o...
1•toomuchtodo•25m ago•1 comments

Linux page-cache corruption via TC pedit: a new Dirty-class variant

https://github.com/rjt-gupta/page-cache-corruption-lpes/tree/main/dirty_pedit
1•rjt-gupta•28m ago•1 comments

Don't be a meat proxy

https://gruhn.me/blog/2026-08-03/
81•ngruhn•32m ago•32 comments

R-457 – a 27M-parameter reasoning model running offline across two ESP32-S3

https://github.com/harmansingh4163-ai/R-457
1•harmansingh4163•32m ago•0 comments

Linux 7.2-rc6: The biggest rc6 in years

https://lwn.net/ml/all/CAHk-=whoz5Uy-kmrdzjrpCJCVWW3fni31c-zsHcH7TkOhRhfOA@mail.gmail.com/
1•zdkaster•38m ago•0 comments

Britain's Hikikomori

https://dispatch-media.com/meet-britains-hikikomori/
2•littlexsparkee•38m ago•0 comments

Situational Awareness and the Impending Stock Market Volatility

https://www.emergingtrajectories.com/lh/situational-awareness-bigger-picture/
3•cl42•43m ago•3 comments

How AI Is Reshaping Human Reasoning and the Rise of Cognitive Surrender

https://www.researchgate.net/publication/399711077_Thinking-Fast_Slow_and_Artificial_How_AI_is_Re...
1•akbarnama•44m ago•1 comments