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.

MCP OAuth 2.1: PKCE, Resource Metadata and Client ID Metadata Documents

https://www.permit.io/blog/oauth-on-mcp
1•authbyexample•2m ago•0 comments

I gave Claude Code a memory and it used 26% fewer tokens

https://omnimem.org/
1•Ric_Harvey•3m ago•0 comments

Stoolap 0.5.0: One Query, One Answer

https://stoolap.io/blog/2026/11/17/stoolap-0-5-0-one-query-one-answer/
1•murat3ok•3m ago•0 comments

Workers Are Not Going to Be OK

https://www.nytimes.com/2026/11/17/opinion/ai-bubble-workers.html
3•keeda•4m ago•1 comments

DOJ letter shows UCLA medical school discriminates against Asians and Whites

https://www.justice.gov/crt/media/1439581/dl
1•illidan1000•6m ago•0 comments

Show HN: Prismantis for OpenCode, drawing the mermaid charts it leaves as source

https://github.com/NahumLitvin/prismantis
2•lnahum•8m ago•0 comments

Morphic Resonance and Morphic Fields

https://www.sheldrake.org/research/morphic-resonance/introduction
1•andsoitis•14m ago•0 comments

Standard Support: How AI agents ask for support

https://docspring.com/blog/posts/standard-support-ai-agent-tickets/
1•nathan_f77•15m ago•1 comments

LLMs abandon correct climate facts when users push back (UNESCO/UCL)

https://www.ucl.ac.uk/news/2026/nov/ai-systems-are-easy-pressure-giving-false-climate-information
1•pguyot•15m ago•0 comments

Open WebUI – Open Terminal: A Computer for Your AI Agents

https://openwebui.com/open-terminal
1•cobychapple•16m ago•0 comments

Chinese firm unveils first integrated analog chip for one-step matrix solving

https://www.globaltimes.cn/page/202611/1374333.shtml
1•kavalg•18m ago•1 comments

RiddleBell Puzzle Alarm Clock

https://play.google.com/store/apps/details?id=com.alarm.riddlebell.app&hl=en_US
1•syedaaaimannn•19m ago•0 comments

The Complete Guide to the into the Wild Bus [2022 Tribute]

https://www.greenbelly.co/pages/into-the-wild-bus
1•thunderbong•21m ago•0 comments

Physics AI: The illusion of ground truth

https://rpep.dev/posts/physics-ai-the-illusion-of-ground-truth/
2•rpep•23m ago•0 comments

Introduction to CUDA Beyond the Syntax

https://medium.com/@aadyachinubhai/introduction-to-cuda-beyond-the-syntax-c77866c3752d
1•aadyachinubhai•23m ago•0 comments

The Gödel Editorial Project: A Synopsis (2005, Pdf)

https://math.stanford.edu/~feferman/papers/Goedel-Project-Synopsis.pdf
1•throwaway81523•23m ago•0 comments

A different interpretation of the same old mathematics

https://medium.com/@aadyachinubhai/a-different-interpretation-of-the-same-old-mathematics-545f795...
1•aadyachinubhai•27m ago•0 comments

The Risks Are the Roadmap

https://varoa.net/2026/11/17/the-risks-are-the-roadmap.html
1•srvaroa•28m ago•0 comments

Codeberg is down due to a domain issue

https://social.anoxinon.de/@Codeberg/117636454915265360
8•latexr•29m ago•2 comments

Godot Foundation Welcomes Manus as Platinum Sponsor

https://godotengine.org/article/partners_manus_sponsorship_2026_announcement/
1•rdmuser•29m ago•2 comments

Forensic Evidence that BBC were unlawfully deploying Optimizely across the EU

https://websentinel.eu/research/
1•AlexanderHanff•30m ago•1 comments

Show HN: Math 2.0

https://math2.tamnd.com/areas/
2•tamnd•31m ago•0 comments

Show HN:openRocode–let multimodal models drive robots the way they use computers

https://github.com/wrencanfly/openRocode/tree/main
1•muyin1215•31m ago•0 comments

Whisper Large-v3 Turbo on Intel Xeon 6 with HPE ProLiant DL380 Gen12 [pdf]

https://cdn.sanity.io/files/ls8k7ser/production/a569f09b5c0b86cd7624239d5a146b3401e37e79.pdf?dl=M...
2•decide1000•32m ago•0 comments

Palmer Luckey is planning to build a community at sea

https://twitter.com/palmerluckey/status/2122861334371180795
1•nstj•33m ago•2 comments

A 1:1 scale replica of Earth in Minecraft

https://worldcraft.gg
2•metafunctor•38m ago•0 comments

A Campfire port in Agentica, measured against Go

https://www.agentica-lang.com/blog/campfire-faster-than-go/
1•sonic182•38m ago•0 comments

Write text parsers with yacc and lex

https://developer.ibm.com/tutorials/au-lexyacc/
1•ankitg12•39m ago•0 comments

Talos Linux

https://www.siderolabs.com/talos-linux
5•SweetSoftPillow•40m ago•1 comments

Voyager 1 Live Telemetry Feed Approaching One Light-Day

https://whereisvoyager1.com/
2•NaOH•41m ago•0 comments