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.

Electron apps: web browsers in a trenchcoat

https://ssg.dev/electron-apps-web-browsers-in-a-trenchcoat/
2•sedatk•2m ago•0 comments

The Death of the Software Developer

https://aimakesmesad.com/the-death-of-the-software-developer/
2•Rudism•6m ago•0 comments

Tangled · The next-generation social coding platform

https://tangled.org
1•antfarm•7m ago•0 comments

Ask HN: What did you learn last month? (June 2026)

1•bhu1st•8m ago•0 comments

PgGraph: Transform your Postgres data to graphs

https://github.com/Evokoa/pgGraph
1•handfuloflight•9m ago•0 comments

Freya 0.4 – Rust GUI library

https://freyaui.dev/posts/0.4
2•birdculture•9m ago•0 comments

In Germany if you say a restaurant is just ok they send the gestapo after you

https://twitter.com/eigen_moomin/status/2077471686295957749
3•bko•11m ago•0 comments

Orchflows: Build self-improving loops in one sentence

https://github.com/DanMcInerney/orchflows
2•DanMcInerney•14m ago•0 comments

Lucy 2.5 – Realtime Video Editing via World Model

https://lucy.decart.ai/
1•ProjectBarks•16m ago•0 comments

British runner Josh Kerr smashes 27-year-old men's mile record

https://www.espn.com/olympics/story/_/id/49391430/british-runner-josh-kerr-smashes-27-year-old-me...
1•linuxfan2718•17m ago•0 comments

Controlling Reasoning Effort in LLMs

https://magazine.sebastianraschka.com/p/controlling-reasoning-effort-in-llms
1•matt_d•18m ago•0 comments

New Drone Nearly Disappears in Flight

https://www.youtube.com/watch?v=1mUgyV3A1O0
1•bookofjoe•28m ago•1 comments

The Kimi K3 Moment

https://stephen.bochinski.dev/blog/2026/07/18/the-kimi-k3-moment/
2•sbochins•31m ago•0 comments

Sushi – Your Raw Data Served Perfectly

https://trysushi.xyz
2•premxai•33m ago•0 comments

A 30-year-old open problem in complexity theory resolved by GPT-5.6 Pro

https://zenodo.org/records/21431468
1•bmisterxster•34m ago•0 comments

Palantir Durable Agents

https://www.youtube.com/playlist?list=PLSoYzKs38mqI
1•pascal-maker•34m ago•0 comments

Goodbye, and Thanks for All the Bikesheds

https://queue.acm.org/detail.cfm?id=3818307
18•Ygg2•36m ago•2 comments

Direct H2 generation from mixed plastic waste via alkaline thermal treatment

https://www.pnas.org/doi/10.1073/pnas.2537552123
1•bookofjoe•39m ago•0 comments

An uroboros program with 100 programming languages

https://github.com/mame/quine-relay
2•modinfo•40m ago•0 comments

Overtraining as the path to human-like AI

https://www.seangoedecke.com/overtraining-as-the-path-to-human-like-ai/
3•Brajeshwar•40m ago•0 comments

We Built a Multiplayer Code Editor with Cloudflare, Yjs, and CodeMirror

https://coderscreen.com/blog/building-multiplayer-code-editor-cloudflare-yjs-codemirror
2•rogutkuba•40m ago•0 comments

Show HN: Todowing – A browser extension that shows Todoist sub-tasks inline

https://todowing.com/
1•vivgui•45m ago•0 comments

AI's new political donor class is outspending Big Tech's last one

https://sfstandard.com/2026/07/18/ai-s-new-political-donor-class-already-outspending-big-tech-s-l...
4•roddylindsay•46m ago•0 comments

Polybius: The Most Dangerous Arcade Game Ever Made. A Dive into Some Arcade Lore

https://lowendbox.com/blog/polybius-the-most-dangerous-arcade-game-ever-made-a-deep-dive-into-som...
2•bananamogul•47m ago•1 comments

SadServer Solutions

https://www.vladimircicovic.com/2024/06/sadserver-solutions
2•taubek•49m ago•0 comments

Strange loops: from autological words and quines to consciousness

https://www.youtube.com/watch?v=MFR6SMV64h4
1•modinfo•50m ago•0 comments

The Human Worker as Civilizational Nexus

https://read.lukeburgis.com/p/the-human-worker-as-civilizational
2•momentmaker•52m ago•0 comments

Food Never Come – no calories, no bill, just dopamine

https://foodnevercome.com/
1•appreciatorBus•53m ago•1 comments

Stately Agent: Build agents as state machines

https://github.com/statelyai/agent
2•handfuloflight•53m ago•0 comments

Apple bug crashes apps that display Telugu character (2018)

https://www.theguardian.com/technology/2018/feb/16/apple-bug-crashes-apps-that-display-telegu-cha...
1•thunderbong•55m ago•0 comments