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.

Investors warn Anthropic could struggle to sustain revenues post-IPO

https://www.ft.com/content/96d0a206-a37b-4166-b78d-b27ed24f7d57
1•1vuio0pswjnm7•1m ago•0 comments

Show HN: A browser MMO designed to be played by scripts, not people

https://space-core.at/
1•SpaceCoreDev•4m ago•0 comments

AI Journal 2: Vibe-Coding for Fun and Profit

https://devshrine.net/blog/ai-journal-2/
1•renehsz•7m ago•0 comments

Why MCP Was Always a Bad Idea

https://maharship.com/blog/why-mcp-was-always-a-bad-idea/
3•maharshi365•7m ago•0 comments

The Economics of Open-Weight Inference [pdf]

https://data.ornn.com/the-economics-of-open-weight-inference.pdf
1•adletbalzhanov•8m ago•0 comments

AI-native degree planning software for universities

https://www.coursetrees.com
1•noahfinkelstein•8m ago•1 comments

Reviving the language that brought us the Jak and Daxter Series

https://opengoal.dev/
1•birdculture•8m ago•0 comments

Exploration-Exploitation Dilemma

https://en.wikipedia.org/wiki/Exploration%E2%80%93exploitation_dilemma
1•azhenley•11m ago•0 comments

Tg-Rich-Converter: Streaming LLM Markdown and LaTeX to Telegram Bot API 10.1

https://github.com/kobaltgit/tg-rich-converter
1•kobaltGIT•12m ago•0 comments

Give, Don't Take

https://schestowitz.com/Weblog/archives/2026/09/20/give-dont-take/
1•amcclure•13m ago•0 comments

Experiments in Squatting

https://moxie.org/stories/together-two/
1•simonebrunozzi•14m ago•0 comments

The Hierarchy of Money

https://gregorygundersen.com/blog/2026/09/20/hierarchy-of-money/
2•gwgundersen•14m ago•0 comments

JEV OAS Sentinel – catch breaking API changes hidden in OpenAPI prose

https://github.com/marketplace/actions/jev-oas-sentinel
1•bookcool•15m ago•0 comments

Slapp Censorship – Pt. 190/200: Plagiarism, Back Doors, and Sabotage of Linux

https://techrights.org/n/2026/09/20/SLAPP_Censorship_Part_190_Out_of_200_Plagiarism_Back_Doors_an...
2•amcclure•15m ago•0 comments

GNU/Linux Has Grown a Lot Lately

https://techrights.org/n/2026/09/20/GNU_Linux_Has_Grown_a_Lot_Lately.shtml
1•amcclure•16m ago•0 comments

Safety Warning: Carborane Mixtures

https://www.science.org/content/blog-post/safety-warning-carborane-mixtures
1•EA-3167•20m ago•0 comments

The Problem Is Prompt Debt

https://www.dbreunig.com/2026/06/22/the-problem-is-prompt-debt.html
1•raphaelcosta•21m ago•0 comments

How workers are unlocking new ways of working

https://openai.com/index/unlocking-new-ways-of-working/
2•rdslw•22m ago•0 comments

Tensorbrife

https://www.tensorbrife.site/
2•tjjune•22m ago•1 comments

Show HN: Emetgate – a verification gate between an LLM and your source tree

https://github.com/emetgate/emetgate
2•ugurcl•23m ago•0 comments

How to Be Sovereign

1•At1C•30m ago•0 comments

Post-Quantum OpenID Connect

https://openid.net/post-quantum-openid-connect/
1•EthanHeilman•31m ago•0 comments

Geatsc – TypeScript-to-C++ Compiler

https://github.com/geastack/compiler
1•arbayi•32m ago•0 comments

One model writes the code, a different model reviews it

https://github.com/WDahah/portable-dsh-multi-agent-plugin
1•WDahah•34m ago•0 comments

Show HN: SubCrisp, a free subscription tracker that shows what cancelling saves

https://subcrisp.com/
1•dablity•34m ago•0 comments

What Is It Like to Be a Cat Tail? (2021)

https://gwern.net/blog/2021/cat-tail
1•1317•35m ago•0 comments

Planetary Boundaries Laser Talk Booklet

https://docs.google.com/document/d/1K7O1Aq2EXhZ2AJhJunAwuZ8B41nZFfGufFRJDe92jdA/edit?tab=t.0
1•debo_•38m ago•1 comments

Claude skill and Obsidian plugin to proofread your English writing

https://codomaniac.com/claude-skill-and-obsidian-plugin-to-proofread-your-english-writing/
1•piorus•39m ago•0 comments

Show HN: NiceTryGPT and CTF and riduzione degli shortcut LLM

https://github.com/aleff-github/NiceTryGPT
2•aleff•40m ago•0 comments

NodeX – Serverless P2P E2EE Messenger in Rus

https://github.com/NetGadz/NodeX
1•gadz•40m ago•0 comments