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.

Bending Spoons Acquires Mailchimp

https://www.businesswire.com/news/home/20261119179325/en/Bending-Spoons-has-entered-into-a-defini...
1•nthypes•16s ago•0 comments

Pillars of Enduring Strength: Learning from Hermann Weyl

https://academic.oup.com/book/63460/chapter/577772313
1•jjgreen•1m ago•0 comments

Bending Spoons to acquire Mailchimp

https://investors.bendingspoons.com/newsroom/bending-spoons-to-acquire-mailchimp
1•mutator•1m ago•0 comments

Codeberg.org domain suspension on 2026-11-18

https://codeberg.org/Codeberg/changelog/issues/7#issuecomment-28100157
1•robin_reala•3m ago•0 comments

Rest of World faces prospect of shutting down

https://www.semafor.com/article/10/25/2026/rest-of-world-faces-prospect-of-shutting-down
1•Michelangelo11•3m ago•0 comments

Muxlio – Durable Agent Workflows

https://github.com/Muxlio/muxlio
3•muxlio•6m ago•0 comments

When AI-built apps get risky: data from 3,911 repos

https://pathtoship.com/blog/when-ai-built-apps-actually-break
1•nathanghart•6m ago•0 comments

A GPT-Live voice companion for seniors with memory and back end

https://github.com/mcbuehler/albert
1•mcbuehler•8m ago•0 comments

Hardening GitHub Actions Against Insider Threats

https://socket.dev/blog/hardening-github-actions-against-insider-threats
2•speckx•9m ago•0 comments

Cincinnati Zoo's Fiona the hippo has died, days after ingesting a visitor's hat

https://apnews.com/article/fiona-hippo-cincinnati-zoo-hat-3d90d10c57698af06e5a7a67bed05608
1•FigurativeVoid•10m ago•0 comments

An honest threat model for blinding Gmail with attested relays

https://github.com/danicuki/zeromx/blob/main/docs/07-threat-model-and-limits.m
1•danicuki•11m ago•0 comments

Show HN: Search your Google Maps saved places

https://maptools.app/
1•rogerdickey•11m ago•0 comments

PostEconomic.Supply – buy things from your rich friend's house

https://posteconomic.supply/house/outside
1•ohong•12m ago•0 comments

Nonsumers

https://nonsumers.com/
1•alfredmalmros•14m ago•0 comments

Show HN: Billet – 6MB (Agentic) Task Management System

https://mktwsk.xyz/billet/
1•skytrias•15m ago•0 comments

Haudenosaunee Thanksgiving Address: Greetings to the Natural World [pdf]

https://americanindian.si.edu/environment/pdf/01_02_Thanksgiving_Address.pdf
1•PaulHoule•20m ago•0 comments

Show HN: A SEO Tool to get found by Google and get cited by AI

https://mozolite.com
1•eduardpantazi•21m ago•0 comments

1 in 5 Salaried Workers Reportedly Calling Out as 'Grand Theft Auto VI' Launches

https://www.forbes.com/sites/antoniopequenoiv/2026/11/18/gta-flu-hits-offices-thursday-heres-how-...
1•madihaa•22m ago•0 comments

Self-hosted library branch over public web OPDS

https://joinmayberry.com/
2•philips•22m ago•0 comments

Anthropic should give stock to Stack Overflow (and OpenAI too)

2•thetjmccarty•23m ago•0 comments

Concerns Grow over Aging Hoarder Sister

https://www.uexpress.com/life/dearabby/2026/11/19
1•colinprince•23m ago•0 comments

Copilot is "the new OS for work," and now Office runs inside of it

https://arstechnica.com/gadgets/2026/11/microsoft-calls-copilot-the-new-os-for-work-at-ignite-key...
1•CharlesW•23m ago•0 comments

Deploy-rs in 2026: reviving our Nix deployment tool

https://serokell.io/blog/deploy-rs-nix
2•todsacerdoti•23m ago•0 comments

Did Databricks kill or buyout HighTouch?

https://www.databricks.com/blog/customerlake-conversions
1•fairytalemtg•27m ago•0 comments

Show HN: Fizzler – a simple tool that pulls agents out of defaultthink

https://fizzler.ai/
1•Mandelion•27m ago•1 comments

CURBy CU Randomness Beacon

https://random.colorado.edu/
1•lisper•29m ago•0 comments

Send Us Thine Asteroid, O Lord [video]

https://www.youtube.com/watch?v=hkTgYiMDRHY
2•AareyBaba•30m ago•1 comments

State of AI Climate Impact 2026

https://ketanjoshi.co/2026/11/11/briefing-state-of-ai-climate-impact-2026/
1•speckx•31m ago•0 comments

Glossary of words and concepts in artificial intelligence

https://www.nytimes.com/2026/11/18/science/ai-artificial-intelligence-terminology-glossary.html
1•ripe•31m ago•0 comments

Show HN: Lava Puzzle – Daily puzzle game about combining lava and water

https://lavapuzzle.com/
1•makes•31m ago•0 comments