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: MyWritingTwin: an AI Writing Profile that makes LLMs sound like you

https://www.mywritingtwin.com
1•writingdna•8m ago•0 comments

Spent EV Batteries Get Second Life as Higher-Performance Battery Material

https://today.ucsd.edu/story/spent-ev-batteries-get-second-life-as-higher-performance-battery-mat...
1•giuliomagnifico•10m ago•0 comments

EXo Platform 7.2: Native AI Powering a Unified and Intelligent Digital Workplace

https://www.exoplatform.com/blog/exo-platform-7-2-ai-powered-unified-digital-workplace/
1•jaouanebrahim•11m ago•0 comments

A bug I ran into when using Java Modules

https://old.reddit.com/r/java/comments/1ul2wiz/a_bug_i_ran_into_when_using_java_modules_plus/
1•Tomte•12m ago•0 comments

Word Count for Blog Posts: How Long Should Yours Be?

https://fastwordcount.com/blog/real-time-word-counter-boost-your-writing-efficiency/
1•rajkverma123•16m ago•0 comments

Grasse and the London Connection (2025)

https://www.englishmaningrasse.com/post/grasse-and-the-london-connection
1•zeristor•20m ago•0 comments

A 'new way of thinking' boosted math proficiency in an East Palo Alto school

https://www.paloaltoonline.com/east-palo-alto/2026/07/01/a-new-way-of-thinking-boosted-math-profi...
5•hbarka•21m ago•0 comments

Pasqal exceeds 1k Atoms in Quantum Processor

https://www.pasqal.com/newsroom/pasqal-exceeds-1000-atoms-in-quantum-processor/
1•fofoz•25m ago•0 comments

Evaluation order and nontermination in query languages

https://www.rntz.net/post/2026-06-11-datalog-nontermination.html
2•luu•30m ago•0 comments

Show HN: Noter – AI agent dashboard for monitoring coding harnesses locally

https://noterai.tech
1•carlobizzaro•31m ago•0 comments

Show HN: Deterministic Simulation Testing

https://workers.io/blog/deterministic-simulation-testing/
1•chaitanyya•33m ago•0 comments

The Download: Anthropic Launches Claude Science, and California's Carbon Manure

https://www.technologyreview.com/2026/07/01/1139996/the-download-anthropic-claude-science-califor...
2•joozio•36m ago•0 comments

A Machine-Verified Proof of a Quantum-Optimization Conjecture

https://arxiv.org/abs/2606.29687
3•ilaysat•40m ago•0 comments

AgentOS

https://agentos-sdk.dev/
1•handfuloflight•40m ago•1 comments

I think it's still important to understand the code that our agents write

https://twitter.com/geoffreylitt/status/2072522251300409556
4•tosh•42m ago•0 comments

Let's Go Kill the Internet

https://nymag.com/intelligencer/article/doublespeed-tech-founder-creating-an-army-of-ai-influence...
2•Michelangelo11•42m ago•0 comments

MarketFish – Simulate a market with 128 AI consumers before you launch

https://github.com/Key-wxh/market-fish
3•a280887763•45m ago•0 comments

Text AI watermarks will always be trivial to remove

https://www.seangoedecke.com/text-ai-watermarks/
2•ingve•49m ago•0 comments

Show HN: Scalable AI Management Platform

https://github.com/metadist/synaplan/
1•metaralf•54m ago•0 comments

The gauge broke: devs felt 20% faster with AI, measured 19% slower

https://intrepidkarthi.com/writing/the-gauge-broke/
57•intrepidkarthi•55m ago•55 comments

BioShocking AI: "Gaming" the AI Browser and Escaping Its Guardrails

https://layerxsecurity.com/blog/bioshocking-ai-gaming-the-ai-browser-and-escaping-its-guardrails/
1•croes•55m ago•0 comments

Horsewood (2 July 2026) We Tried It My Honest ReviewS

https://finance.yahoo.com/sectors/healthcare/articles/horsewood-urgent-report-2026-horse-19110038...
3•Gafyhanu•58m ago•0 comments

Seattle Just Had an Earthquake

5•tobinfekkes•1h ago•4 comments

Feds Might Flip the Script on Right to Repair Vehicle Emissions Systems

https://www.thedrive.com/news/feds-might-flip-the-script-on-right-to-repair-vehicle-emissions-sys...
2•josephcsible•1h ago•0 comments

Likelihood, and Maximum Likelihood, in Statistics

https://bactra.org/notebooks/likelihood.html
2•Tomte•1h ago•0 comments

Fable 5 is insanely good

5•vuphanse•1h ago•0 comments

Ask HN: Who's Hiring Remote Contractors? (July 2026)

2•akashwadhwani35•1h ago•1 comments

Typst: Designing for Incrementality (Laurenz Mädje at RustWeek) [video]

https://www.youtube.com/watch?v=yWWVhbyOWWE
3•felixhummel•1h ago•0 comments

Rasa Intelligence: AI diagnostic engine-gives one business verdict in 90 seconds

https://tech-rasa.com
2•Deepti251•1h ago•0 comments

My Story of 3D Realms / Apogee Part I (2020)

https://joesiegler.blog/2020/11/my-story-of-apogee-3dr/
2•Michelangelo11•1h ago•0 comments