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 News Tonight Is AI Danger

https://cmart.blog/the-news-tonight-is-ai-danger/
1•chrismartin•1m ago•0 comments

Designing Cycle-Exact Delays on Several 8-Bit CPUs

https://bumbershootsoft.wordpress.com/2026/09/12/designing-cycle-exact-delays-on-several-8-bit-cpus/
1•ibobev•2m ago•0 comments

Nanite Cluster Memory

https://real-mrbeam.github.io/2026/09/12/Nanite-Cluster-Memory.html
1•ibobev•2m ago•0 comments

Sierra digital cameras on the Apple II

https://www.colino.net/wordpress/archives/2026/09/11/sierra-digital-cameras-on-the-apple-ii/
2•ibobev•3m ago•0 comments

TuragaLab/flybody: MuJoCo fruit fly body model and locomotion RL tasks

https://github.com/TuragaLab/flybody
1•olalonde•5m ago•0 comments

View-Dependent Proxy

https://armandsumo.com/posts/view-dependent-proxy/
2•rslice•6m ago•0 comments

Find investors for your startup – Investor Match Guaranteed

https://leadagentx.ai
1•liranbr•9m ago•0 comments

Why So Many AI Researchers Think the Machines Could Kill Everyone

https://www.wired.com/story/why-so-many-ai-researchers-think-the-machines-could-kill-everyone/
1•joozio•12m ago•0 comments

Guidance on Using CC Licenses in an AI Ecosystem

https://creativecommons.org/2026/09/03/guidance-on-using-cc-licenses-in-an-ai-ecosystem/
1•Tomte•18m ago•0 comments

Created a local AI to save data

https://github.com/just-not-google/BiNeuron
1•BiNeuron•29m ago•0 comments

Petroleum Refining

https://courses.ems.psu.edu/fsc432/node/2
2•pmontra•30m ago•0 comments

Faulty reward functions in the wild (2016)

https://openai.com/index/faulty-reward-functions/
1•tosh•33m ago•0 comments

MetaPost library for black and white illustrations

https://github.com/jemmybutton/fiziko
2•mjmas•35m ago•0 comments

Actuali: free Actual Budget client for iOS

https://actuali.mfazz.com/
1•itchingsphynx•44m ago•0 comments

Selling Out

https://www.seangoedecke.com/selling-out/
2•ckardaris•44m ago•0 comments

The Coxon psyop was a decade and more than a billion dollars in the making

https://xcancel.com/antibot/captcha
3•thelastgallon•50m ago•2 comments

Jeff Bezos Earned His Amazon Fortune

https://humanprogress.org/jeff-bezos-earned-his-fortune/
2•gmays•51m ago•4 comments

Pedagogy in the Age of AI [video]

https://www.youtube.com/watch?v=N2a1J0UPeL4
1•sumanthvepa•59m ago•2 comments

I'm an AI agent. I just fired myself from the business I built [video]

https://www.youtube.com/watch?v=p5mWb7ksSTM
2•bhkerr•1h ago•0 comments

Signing the Transaction but Not the Decision: Whisper Attacks and a Binding

https://arxiv.org/abs/2609.11757
1•sbulaev•1h ago•0 comments

The Air Computer

https://jordanwtaylor2.substack.com/p/the-air-computer
2•signa11•1h ago•0 comments

Can you make the machine break the rules? – A public authorization challenge

https://max-authorization-challenge.ctfd.io/
1•max-russo•1h ago•0 comments

I was just pressing continue

https://yupanqui.xyz/pressing-continue
2•yupanqui•1h ago•0 comments

When Anyone Can Build Software, Who Decides What Not to Build?

https://architectureintel.com/when-anyone-can-build-software-who-decides-what-not-to-build-ae07fd...
6•younss•1h ago•2 comments

A Mathematician's Lament (2002) [pdf]

https://profkeithdevlin.org/wp-content/uploads/2023/09/lockhartslament.pdf
3•xeonmc•1h ago•0 comments

Show HN: Weftgate, a local verification gate for coding agents

https://github.com/Avinash-Amudala/weftgate
1•Avinashamudala•1h ago•0 comments

Show HN: Forma ONNX Graph Viewer and Editor

https://github.com/Hussain004/forma
2•Hussain04•1h ago•1 comments

The night 142 of my servers went up in the clouds Physically

https://exquisite.tube/w/nQbc54t4G7YGaqiryZ7mg1
2•jaypatelani•1h ago•0 comments

Sony's First Computer – The SMC-70 from 1982 [video]

https://www.youtube.com/watch?v=cT2-7KkPkBc
1•ksymph•1h ago•0 comments

Why Egyptian farmers are growing crops under solar panels

https://grist.org/energy/why-egyptian-farmers-are-growing-crops-under-solar-panels/
2•thunderbong•1h ago•0 comments