frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•9mo ago

Comments

zoezoezoezoe•9mo 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•9mo 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.

What Is Claude? Anthropic Doesn't Know, Either

https://www.newyorker.com/magazine/2026/02/16/what-is-claude-anthropic-doesnt-know-either
1•bichonnages•32s ago•0 comments

Show HN: Hacker News for Songs

https://www.sonusly.com/
2•lorenzosch•2m ago•0 comments

The five stages of losing our craft

https://debuggingleadership.com/blog/the-five-stages-of-losing-our-craft
1•fpereiro•3m ago•0 comments

OpenMOQ Software Consortium – Advancing MOQ Protocol

https://openmoq.org/
1•mondainx•3m ago•0 comments

Alphabet sells rare 100-year bond

https://www.reuters.com/business/alphabet-sells-bonds-worth-20-billion-fund-ai-spending-2026-02-10/
3•kaycebasques•5m ago•0 comments

Flood Fill vs. The Magic Circle

https://www.robinsloan.com/winter-garden/magic-circle/
1•tobr•5m ago•0 comments

Ask HN: What conventions exist for declaring AI content online?

1•lukakopajtic•8m ago•0 comments

Show HN: Seedance.fast – Early Access to ByteDance's Seedance 2.0 via Volcengine

https://seedance.fast/
1•thenextechtrade•13m ago•0 comments

The big AI job swap: why white-collar workers are ditching their careers

https://www.theguardian.com/technology/2026/feb/11/big-ai-job-swap-white-collar-workers-ditching-...
3•n1b0m•14m ago•1 comments

Best of 2024 Data Center Podcast [video]

https://www.youtube.com/watch?v=bgggLTpyFPY
1•walterbell•16m ago•0 comments

Downsides to US-Canadian dual citizenship for US resident?

https://immigration.ca/claiming-canadian-citizenship-by-descent-under-canadas-new-citizenship-act...
1•jakedata•19m ago•1 comments

Why Y Combinator and Aaron Epstein Are Betting on AI-Native Agencies

http://ai-native-agency.com/blog/yc-ai-native-agency
1•victorgk_•21m ago•1 comments

OpenClaw Prompt Injection via Chat History Spoofing (Fixed)

https://twitter.com/marckohlbrugge/status/2021442885942702427
1•hanspagel•22m ago•0 comments

Row Polymorphism without the Jargon (2020)

https://jadon.io/blog/row-polymorphism/
1•bjourne•22m ago•0 comments

OpenClaw creator: "Netlify shares phone numbers"

https://twitter.com/steipete/status/2021495699586904083
2•mellosouls•22m ago•1 comments

Emergent: LLM-Native Python Framework

https://github.com/prostomarkeloff/emergent
1•notmarkeloff•24m ago•0 comments

Show HN: Chroma Master A premium Flutter color suite with 7 integrated games

1•Krishna_Avatar•26m ago•0 comments

Web Development Improvements

https://jameskilby.co.uk/2026/01/web-development-improvements/
1•taubek•28m ago•0 comments

How to build your own programming language in C++

https://pvs-studio.com/en/webinar/
1•GodCreation•28m ago•1 comments

Golang textile parser, implemented using Codex as a "clean room" native parser

https://github.com/rcarmo/go-textile
1•rcarmo•30m ago•0 comments

Anna's Archive 'Releases' Spotify Tracks, Despite Legal Pushback

https://torrentfreak.com/annas-archive-quietly-releases-millions-of-spotify-tracks-despite-legal-...
2•c420•34m ago•0 comments

Chrome extensions spying on 37M users' browsing data

https://qcontinuum.substack.com/p/spying-chrome-extensions-287-extensions-495
9•qcontinuum1•36m ago•0 comments

Quantum Gravity Tests Coming Soon

https://physics.aps.org/articles/v19/18
2•sohkamyung•37m ago•0 comments

Show HN: Self-hosted, end-to-end encrypted chat interface for OpenClaw

https://github.com/botschat-app/botsChat
1•thunderbird007•37m ago•0 comments

NationStates Data Breach

https://www.nationstates.net/page=news/2026/02/04/index.html
1•akyuu•37m ago•0 comments

2026 Agentic Coding Trends Report

https://resources.anthropic.com/hubfs/2026%20Agentic%20Coding%20Trends%20Report.pdf?hsLang=en
1•s-macke•40m ago•0 comments

Motivation-Enhancing Drug

https://en.wikipedia.org/wiki/Motivation-enhancing_drug
2•rzk•42m ago•0 comments

Learn and Test DMARC

https://www.dmarctester.com
2•shaunpud•43m ago•0 comments

Something Big Is Happening

https://shumer.dev/something-big-is-happening
2•eternalreturn•44m ago•0 comments

Show HN: Εἶδος – A non-Turing-complete language built on Plato's Theory of Forms

https://github.com/realadeel/eidos
1•proletarian•45m ago•0 comments