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.

What I Want to Tell You About Orbs

https://ampcode.com/notes/what-i-want-to-tell-you-about-orbs
1•tosh•1m ago•0 comments

A Norwegian government agency made a parody of the enshittification phenomenon [video]

https://www.youtube.com/watch?v=T4Upf_B9RLQ
2•acadapter•5m ago•0 comments

Voice notes shouldn't cross the ocean. Keep your thoughts private

https://derogab.com/2026/08/01/AI-Notes/
1•derogab•7m ago•0 comments

The frontier of GPQA-Dumb models

https://github.com/ninjahawk/bongochat
1•ninjahawk1•8m ago•1 comments

Show HN: Ragleap-RAG – RAG engine that documents what it doesn't do yet

https://github.com/antonyrag/ragleap-core
1•antonyragleap•12m ago•0 comments

Show HN: ArtDeck – An infinite canvas for collecting and studying references

https://getartdeck.com/
1•artdeck•13m ago•0 comments

He Wasn't Chasing Mountains

https://hasskhan.substack.com/p/he-wasnt-chasing-mountains
1•pradeepchhetri•14m ago•0 comments

Bloody Awful Work Creeps in When Standards Are Relaxed

https://dailysceptic.org/2026/08/02/bloody-awful-work-creeps-in-when-standards-are-relaxed/
2•Michelangelo11•15m ago•0 comments

Apple says MacBook Neo is pulling schools away from Windows and Chromebooks

https://9to5mac.com/2026/08/01/apple-says-macbook-neo-is-pulling-schools-away-from-windows-and-ch...
2•gslin•15m ago•0 comments

Nifty little macOS toolbar tool to track daily usage

https://github.com/shrivara/token-bar
1•Hasaber8•16m ago•0 comments

Show HN: Gainz.fast – Local Inference, Faster

https://gainz.fast/
1•carsenk•17m ago•0 comments

Show HN: Fruman – A 2D souls-like game demo running in web browser

https://fruman.baklab.app
1•Kholin•22m ago•0 comments

OpenAI has the right strategy, but is unlucky

2•Taikhoom2010•24m ago•0 comments

Trump's AI protectionism has come for robotics

https://www.technologyreview.com/2026/08/03/1141056/trumps-ai-protectionism-has-come-for-robotics/
1•joozio•24m ago•0 comments

Show HN: lde – LuaJIT written, all in one, package manager and runtime

https://lde.sh/blog/lde-0.10.0/
4•oncelock•25m ago•1 comments

Six Problems When You Try to Build an AI Therapist

https://emilylee293105.substack.com/p/six-problems-when-you-try-to-build
2•fhe•29m ago•0 comments

C64 Demo Effects Explained: Rodents in the Attic [video]

https://www.youtube.com/watch?v=uZ1atMUOUMU
1•nikanj•30m ago•0 comments

Halloween Documents

https://en.wikipedia.org/wiki/Halloween_documents
1•sundarurfriend•31m ago•0 comments

China gets better bang for its buck than America in AI

https://www.economist.com/finance-and-economics/2026/08/03/how-china-gets-better-bang-for-its-buc...
2•pingou•36m ago•0 comments

Genkan

https://en.wikipedia.org/wiki/Genkan
1•robalni•37m ago•0 comments

Three lions die at Tokyo's Tama Zoo amid heat wave

https://www.japantimes.co.jp/news/2026/08/04/japan/science-health/heat-lion-deaths-tokyo-zoo/
1•geox•40m ago•0 comments

Show HN: Visualize in 2D/3D map any GitHub user's followers

https://github.com/ThierryRakotomanana/GitCharta
1•ThierryRakt•41m ago•0 comments

ChatTJB advertises a human-powered LLM parody on an SF billboard

https://runtimewire.com/article/chattjb-human-powered-llm-san-francisco-billboard
1•ryanmerket•43m ago•0 comments

Hiring Senior SRE

https://www.axelerant.com/careers
1•adrijadas•45m ago•0 comments

I built an open-source admin panel builder for existing databases

https://github.com/Haimanot25/dboard
2•haimanot25•48m ago•0 comments

Walking to the Car Wash: The Salience Bias of LLMs in Commonsense Reasoning

https://arxiv.org/abs/2607.28478
1•theanonymousone•50m ago•0 comments

Show HN: Generate a plan visualization with dependencies to parallelize projects

https://reloadium.com/reloadium-plans/
1•julienreszka•50m ago•0 comments

Certified Program Synthesis with a Multi-Modal Verifier [pdf]

https://verse-lab.org/papers/leetproof-ase26.pdf
1•matt_d•1h ago•0 comments

Dev tools must be opensourced thats why I build this

1•Thomeras•1h ago•1 comments

Harness Engineering for Self-Improvement

https://lilianweng.github.io/posts/2026-07-04-harness/
2•tosh•1h ago•0 comments