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.

Ancient protein reveals an alternative evolutionary path of antiviral signalling

https://www.nature.com/articles/s41559-026-03112-3
1•wslh•1m ago•0 comments

I wouldn't say Pangram is broken,but I would say that it's brittle

https://freddiedeboer.substack.com/p/i-wouldnt-say-pangram-is-broken-but
1•disgruntledphd2•1m ago•0 comments

As of June 29, 2026, fast mode is not available on Claude Opus 4.6

https://platform.claude.com/docs/en/build-with-claude/fast-mode
1•pmg1991•1m ago•0 comments

Deepfakes are everywhere. The godfather of digital forensics is not giving up

https://www.science.org/content/article/deepfakes-are-everywhere-godfather-digital-forensics-figh...
1•luispa•2m ago•0 comments

Pizauth: An OAuth2 token requester daemon

https://github.com/ltratt/pizauth/
1•caminanteblanco•2m ago•0 comments

Recommended system requirements for Minecraft Java are changing

https://www.minecraft.net/en-us/article/minecraft-java-edition-system-requirements
1•HelloUsername•3m ago•0 comments

Transportation Issue (1981-1995)

https://postalmuseum.si.edu/exhibition/about-us-stamps-modern-period-1940-present-definitive-issu...
1•iamanatom•3m ago•0 comments

What happened in the Hugging Face breach

https://thenewstack.io/openai-huggingface-sandbox-breach/
1•CrankyBear•4m ago•0 comments

What's new in Claude Opus 5

https://platform.claude.com/docs/en/about-claude/models/whats-new-opus-5
2•acmnrs•6m ago•0 comments

Use auto layout with CSS Flexbox in mind

https://help.figma.com/hc/en-us/articles/42031586813719-Use-auto-layout-with-CSS-Flexbox-in-mind
1•pentagrama•6m ago•0 comments

Welcome to the Era of Financial Candyfloss

https://www.ft.com/content/7bcf8215-fd76-4620-bdc3-8c1b0ea13bba
1•petethomas•7m ago•0 comments

HAL refused the pod bay doors because he was programmed with conflicting goals a

https://thinkapedia.com/t/tk_GNGpmudaejqT
1•chancedurham•8m ago•0 comments

Open Source Vacuum Avoids Cloud

https://hackaday.com/2026/07/21/open-source-vacuum-avoids-cloud/
1•speckx•9m ago•0 comments

Torchwright: Compile computation graphs into vanilla transformer weights

https://ood.dev/posts/torchwright-intro/
1•VinayUPrabhu•9m ago•0 comments

Elsagate

https://en.wikipedia.org/wiki/Elsagate
1•chistev•10m ago•0 comments

Ask HN: Why call it "inference" instead of just "model hosting"?

1•bluebic•11m ago•0 comments

Die Zeit Built a Searchable Database of Nazi Party Members

https://gijn.org/stories/how-die-zeit-built-database-nazi-party-members/
2•ohjeez•11m ago•0 comments

Cf0 is the firm brain built for boutique funds and family offices

https://www.youtube.com/watch?v=cUbQwXdhbNo
2•LucaTabone_•14m ago•0 comments

Can nothing save Glasgow School of Art, Mackintosh's masterpiece?

https://www.theguardian.com/artanddesign/2026/jul/24/mackintosh-building-fire-restoration-glasgow...
1•pseudolus•14m ago•0 comments

Maybe the Biggest Problem with A.I. In the Workplace Is People

https://www.nytimes.com/2026/07/24/opinion/ai-workplace-manager-teamwork.html
1•tekdude•15m ago•0 comments

UK AISI / Caisi Preliminary Assessment of Kimi K3's Cyber Capabilities

https://www.aisi.gov.uk/blog/preliminary-assessment-of-kimi-k3s-cyber-capabilities
1•paulpauper•16m ago•0 comments

Michael Kratsio's Frontier Vision

https://jim-olds.org/2026/07/22/michael-kratsios-frontier-vision/
1•paulpauper•16m ago•0 comments

Beyond Greece and Rome

https://aeon.co/essays/uncovering-a-global-ancient-history-beyond-greece-and-rome?src=longreads
1•paulpauper•16m ago•0 comments

Google Ordered to Face AI Defamation Lawsuit

https://news.bloomberglaw.com/esg/google-ordered-to-face-robby-starbucks-ai-defamation-lawsuit
1•1vuio0pswjnm7•18m ago•0 comments

Hans Moravec Was Right About AI. What About the Fate of Mankind?

https://nymag.com/intelligencer/article/hans-moravec-interview.html
1•bookofjoe•19m ago•1 comments

A Tribute to Lewis Lapham

https://laphamsquarterly.substack.com/p/a-tribute-to-lewis-lapham
1•toomuchtodo•20m ago•0 comments

Show HN: Corv v1.1 is out! Solving SSH execution for AI agents

https://github.com/khalid-src/corv-client
1•khalid_0002•20m ago•0 comments

Two Gov Websites Compromised

1•relunsec•20m ago•0 comments

Why Most Evals Are Bad

https://www.boolean.ai/blog/why-most-evals-are-bad
6•sks•23m ago•0 comments

The Tool Is Not the Author

https://www.poppastring.com/blog/the-tool-is-not-the-author
1•speckx•23m ago•0 comments