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.

Show HN: Flying Paper – A native GTK4/C++ Telegram client for Linux

https://github.com/JumpToSkyFree/flying-paper
1•jumptoskyfree•42s ago•0 comments

Show HN: A complete companion for agentic development- Burmese

https://www.theburmese.xyz/
1•dakshjainn•3m ago•0 comments

The cost of forming an LLC in every US state (2026)

https://www.incorpassist.com/blog/us-states/real-cost-to-form-an-llc-by-state
1•incorpassist•5m ago•0 comments

How LLM Serves a Request

https://mapathak-commits.github.io/inference-wall/articles/primer/
1•ariyagi•6m ago•0 comments

Contra Anthropic: AI is not 'structurally' centralizing

https://12gramsofcarbon.com/p/is-ai-structurally-a-centralizing
1•theahura•8m ago•0 comments

How often should a zombie team win?

https://jordanlord.co.uk/blog/simple-elo-football-model/
1•nervous_north•8m ago•0 comments

Linux Network Developers Are ‘Completely Overwhelmed’ by AI Agents :)

https://www.phoronix.com/news/Linux-7.3-Networking
1•mashally•9m ago•0 comments

English Function to Runnable Neural Net

https://programasweights.com/
1•ijidak•9m ago•0 comments

Ask HN: Where do you find things worth reading?

1•bakibab•11m ago•0 comments

On-Call Is Now Theatre

https://boristane.com/blog/on-call-is-now-theatre/
1•cebert•12m ago•0 comments

Open Questions on Open Weights

https://www.astralcodexten.com/p/open-questions-on-open-weights
1•gmays•13m ago•0 comments

People are more bothered by others' false beliefs than by differences in beliefs

https://onlinelibrary.wiley.com/doi/10.1111/pops.70138
1•hn_acker•15m ago•1 comments

Ubuntu is growing faster on Windows 11 than on native Linux PCs, says Canonical

https://www.windowslatest.com/2026/08/16/ubuntu-is-growing-faster-on-windows-11-than-on-native-li...
1•mashally•17m ago•0 comments

Building a Soft Display (Air powered) [video]

https://www.youtube.com/watch?v=RTOARC-yeMc
1•thepbone•18m ago•0 comments

We've Been Using the Wrong Science in Court for 50 Years [video]

https://www.youtube.com/watch?v=mvcesPWvUIc
1•hn_acker•22m ago•1 comments

4K Video Feedback Device: fractal generator and manipulator

https://www.youtube.com/watch?v=koDCabeh5kQ
1•yboris•23m ago•0 comments

Lisp is clay: the power of composable DSLs [video]

https://fosdem.org/2026/schedule/event/HDE7JZ-lisp-is-clay/
1•so-cal-schemer•24m ago•0 comments

Why Racket? Why Lisp?

https://beautifulracket.com/appendix/why-racket-why-lisp.html
2•so-cal-schemer•25m ago•0 comments

Data races and the memory model in Go

https://func25.dev/posts/go-memory-visibility/
1•birdculture•27m ago•0 comments

Complex Systems Fail

https://how.complexsystems.fail/
1•luispa•28m ago•0 comments

Proof.fail – document what didn't work

https://proof.fail/
1•unprovable•28m ago•0 comments

Chinese robot beats Usain Bolt's 100M world record at Beijing games

https://www.reuters.com/sports/chinese-humanoid-robot-lightning-beats-human-100m-world-record-sta...
1•Markoff•30m ago•0 comments

Abah_chat – Persistent Memory Local Chatbot

https://github.com/john-abah/ABAH_CHAT
1•JA2026•30m ago•0 comments

The Singularity Is Post-Privacy

https://hollisrobbinsanecdotal.substack.com/p/the-singularity-is-post-privacy
1•HR01•31m ago•0 comments

Yam – Local AST-based plagiarism detector (MOSS, JPlag, Turnitin alternative)

https://gitlab.com/shamtech.ai/yam
1•jmresler•32m ago•0 comments

Three quarters of Indo-Pacific coral reefs could drown as sea levels rise

https://oceanographicmagazine.com/news/three-quarters-of-indo-pacific-coral-reefs-could-drown-as-...
1•littlexsparkee•32m ago•0 comments

A Hustler's Way – Multiplayer mafia browser game with live economies

https://hustlersway-ten.vercel.app/login
1•YGhosty•34m ago•0 comments

The Fragility of Self-Improving Agents: Variance, Task Order

https://arxiv.org/abs/2608.18066
1•jdcaballerov•35m ago•0 comments

The search for consciousness inside LLMs

https://www.economist.com/interactive/briefing/2026/08/20/the-search-for-consciousness-inside-llms
1•samizdis•38m ago•0 comments

Oura rings unable to measure any signals needed to assess sleep quality / stages

https://techcrunch.com/2026/08/21/oura-faces-lawsuit-accusing-it-of-misleading-consumers-about-sl...
1•cwwc•39m ago•1 comments