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.

Mosquito Joe FDD teardown: 66% fee load, 380% termination spike

https://muse.ai/s/mosquito-joe-fdd-teardown-ch6bxnotxfxldxe
1•FDDTeardown•3m ago•0 comments

What causes AI fatigue for engineers and how to ease the strain

https://thoughtbot.com/blog/what-causes-ai-fatigue-for-engineers-and-how-to-ease-the-strain
3•devonnull•8m ago•0 comments

Argon now avaliable for pro users on ANTIGRAVITY

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-argon/
1•applesauce3572•8m ago•0 comments

Timestral

https://mistral.ai/news/timestral/
2•NathaP•11m ago•0 comments

Free-AI-tools – Curated list of free and low cost AI tools

https://github.com/ShaikhWarsi/free-ai-tools
1•peter_d_sherman•12m ago•0 comments

Pace of Global CO2 Emissions Continue Dropping

https://politicalcalculations.blogspot.com/2026/10/pace-of-global-co2-emissions-continue.html
1•qclibre22•13m ago•0 comments

Business accounts will consent to Meta scraping their websites Starting Oct. 30

https://www.niemanlab.org/2026/10/metas-new-commercial-terms-will-allow-the-scraping-of-news-site...
1•0in•14m ago•0 comments

GPT-Live-1.1 – New voices. Better accents. Less "checking."

https://twitter.com/OpenAI/status/2110797830361436604
1•vthommeret•17m ago•0 comments

I read a 122-page franchise FDD so you don't have to – That 1 Painter teardown

https://muse.ai/s/fdd-teardown-landing-page-gh6bxmdxffpxgxk
1•FDDTeardown•19m ago•0 comments

Calculators to find the value of your business data

https://businessdataworth.com/
1•hiveindex•23m ago•0 comments

Show HN: Find a compatible partner through Matchmaking

https://modern-matchmaker.com/en
1•drma-tech•24m ago•0 comments

Ask HN: Do you talk to bots online? How has it changed?

1•adverbly•25m ago•0 comments

Linus Torvalds: "banning AI is stupid and so are you"

https://lkml.org/lkml/2026/10/13/3242
5•majorchord•25m ago•6 comments

Is Liquid Metal Killing Our PCs? Scientific Analysis and a 2-Year Test [video]

https://www.youtube.com/watch?v=eF6bMSjPepM
1•zdw•28m ago•0 comments

BeBox is a Haiku application that emulates Be Inc.'s BeBox

https://github.com/johnrash/bebox
3•rguiscard•29m ago•0 comments

Datadog Scout 1.0: New SRE model for investigating production issues

https://www.datadoghq.com/blog/ai/introducing-scout-sre-specialized-model-bits-ai/
1•wavelander•33m ago•1 comments

U.K. Sanctions Cryptomus for RU Money Laundering

https://krebsonsecurity.com/2026/10/u-k-sanctions-cryptomus-for-ru-money-laundering/
2•Bender•34m ago•0 comments

Data Science Weekly – Issue 673

https://datascienceweekly.substack.com/p/data-science-weekly-issue-673
1•sebg•34m ago•0 comments

iCloud Photos is now required for permanent Shared Albums

https://support.apple.com/en-us/108314
2•nde•34m ago•1 comments

Veda: First Intelligent Hoby OS

https://github.com/vahmoh25/Veda/blob/main/documentation/AGENT.md
1•saeed3saeed•34m ago•0 comments

DeLorean may have a flying car in the air before Tesla does [video]

https://electrek.co/2026/10/14/delorean-may-have-a-flying-car-in-the-air-before-tesla-does-video/
1•Bender•35m ago•0 comments

Company that put gas engines in Teslas goes bankrupt owing $37M

https://electrek.co/2026/10/15/obrist-hyperhybrid-gas-engine-tesla-bankruptcy/
2•Bender•36m ago•0 comments

Yours

https://blog.coredump.cx/p/yours-truly
1•surprisetalk•36m ago•0 comments

OpenTodo, a Todoist killer with MCP integration

https://open-todo.app/
1•TutleCpt•41m ago•1 comments

San Francisco Unified to remove lottery system

https://edsource.org/updates/san-francisco-unified-to-remove-lottery-system-assign-students-to-ne...
1•i0exception•41m ago•0 comments

PrismML Releases Bonsai 2 2B, 4B, and 9B

https://huggingface.co/collections/prism-ml/bonsai-2-small
1•JonSchneider•42m ago•0 comments

No More Heroes – Terence Tao Talks to Numberphile About AI [video]

https://www.youtube.com/watch?v=bAnwMdfcMVw
1•marvinborner•42m ago•0 comments

A tool to compare LLM benchmarks

https://philippdubach.com/posts/model-atlas-capability-weights/
1•7777777phil•42m ago•1 comments

I built something in my free time! A gift service :)

https://www.nextpagegift.com/
1•Negary•46m ago•1 comments

Dev publishes 25-year-old Palm OS tools to GitHub

https://www.theregister.com/offbeat/2026/10/15/give-him-a-hand-dev-publishes-25-year-old-palm-os-...
2•dmitrygr•47m ago•0 comments