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: Warp DD – AI that analyzes technology ecosystems in ~30 seconds

https://warpdd.com
1•masato_furuno•4m ago•0 comments

Meta's blockbuster trial draws parallels to big tobacco

https://www.economist.com/business/2026/08/18/metas-blockbuster-trial-draws-parallels-to-big-tobacco
2•newsomix9xl•6m ago•0 comments

Keenpix – an OSS image CDN with predictable managed pricing

https://keenpix.com/
1•lord007tn•15m ago•1 comments

The End-State Fallacy: Where Is AI Security Headed?

https://endstatefallacy.com/
1•allanbreyes•17m ago•0 comments

Universal Dive Data Format

https://wrobell.dcmod.org/uddf/
2•nvahalik•17m ago•0 comments

Sutton and Javed: Why AI Models Stop Learning, and How to Start It Again [video]

https://www.youtube.com/watch?v=xH7U7w9Qzlo
1•abetusk•18m ago•0 comments

OpenAI halts testing, slows development after rogue model hacked Hugging Face

https://www.abc.net.au/news/2026-08-19/openai-slows-development-pauses-testing-after-hugging-face...
1•scorpioxy•20m ago•0 comments

She told no one about her agony except ChatGPT. What her death reveals about AI

https://www.npr.org/2026/08/18/nx-s1-5929575/ai-suicide-risks-mental-health
2•newsomix9xl•21m ago•1 comments

SpaceX tugs Starship into port after 24 days at sea

https://arstechnica.com/space/2026/08/its-christmastime-at-spacex-as-company-salvages-starship-fr...
2•Metacelsus•21m ago•0 comments

In a Heat Wave, Schizophrenia Is Much Deadlier Than Any Other Medical Condition

https://www.wired.com/story/heat-wave-schizophrenia/
1•littlexsparkee•21m ago•0 comments

Xerox invented the modern PC, then priced the Star at $16,595 (1981)

https://www.youtube.com/watch?v=a77jCSD6r_M
3•adhikaribipin•22m ago•0 comments

RF Cafe

https://www.rfcafe.com/
3•gregsadetsky•24m ago•0 comments

Show HN: Automatically detect and patch walking-dead states in Sierra games

https://github.com/katiahayati/lucasartsifier/
2•wkfauna•32m ago•0 comments

OpenLogi

https://openlogi.org/en
3•amatheus•32m ago•0 comments

Show HN: SubTrends – 18 years of Reddit data across 100K+ subreddits

https://subtrends.io/
2•dataneedscoffee•32m ago•0 comments

What's the best pitch for "Why not Claude"?

1•jlim99•32m ago•2 comments

Spinifex: Open-Source Amazon Web Services Alternative – OpenAlternative

https://openalternative.co/spinifex
1•tom_mulgadc•33m ago•0 comments

Language-like structure arises in learned signaling: evidence from birdsong

https://www.science.org/doi/10.1126/sciadv.aea3015
2•wslh•36m ago•0 comments

Tonnes of nuclear material found at Syria site, UN atomic watchdog says

https://www.rte.ie/news/middle-east/2026/0818/1588407-syria-nuclear/
3•wslh•43m ago•1 comments

Qwen3.8-27B make medium the default effort level instead of xhigh

https://github.com/alainnothere/llama.cpp/blob/disk-cache-eviction/models/templates/Qwen3.8-27B-m...
3•xlayn•46m ago•1 comments

Amazon scans and destroys books to comply with copyright law

https://bsky.app/profile/steveklabnik.com/post/3mtejjs6s2c2y
5•platzhirsch•50m ago•3 comments

Proof-Carrying Pipelines: attest local gate runs so CI can skip re-execution

https://github.com/JackCid89/proof-carrying-pipelines
1•jackcid89•51m ago•0 comments

The Vietnam Binh Chau (Chau Tan) Late Tang Wreck

https://www.koh-antique.com/client/tangwreck/tangwreck.html
3•teleforce•54m ago•1 comments

How to build an eval set you can maintain

https://langfuse.com/academy/evaluate/choosing-what-to-evaluate
2•lotteverh•58m ago•0 comments

Do All Your Agents Need Models Like Claude 5 or GPT-5.6?

https://aimoway-lab.github.io/blog/articles/do-all-your-agents-really-need-models-like-claude-5-o...
2•AIMOWAY•1h ago•0 comments

The Integer

https://gist.github.com/17twenty/1f230ab8256f42d4cd3ba931b9bd440b
16•hactually•1h ago•1 comments

That Disgraceful, Disreputable, (Wonderful) Form of Punctuation: The Parenthesis

https://lithub.com/on-that-disgraceful-disreputable-wonderful-form-of-punctuation-the-parenthesis/
8•pseudolus•1h ago•0 comments

ServiceNow are pushing customers off SaaS – are other industries doing similar?

4•rorychatt•1h ago•2 comments

Netstate – US Business Data from Primary Sources

https://netstate.co
2•qitx•1h ago•0 comments

OpenAI announces slowing pace of development after hack by rogue agent

https://www.theguardian.com/technology/2026/aug/18/open-ai-pause-hack
2•pseudolus•1h ago•1 comments