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•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.

Ask HN: Why has Taichi-Lang's development frequency declined?

https://github.com/taichi-dev/taichi
1•SamCoding•32s ago•1 comments

AI's biggest critic has lost the plot

https://www.theargumentmag.com/p/ais-biggest-critic-has-lost-the-plot
1•m-hodges•2m ago•0 comments

Show HN: Extract Biomedical Knowledge from Multi-Modal Data Using Biovista Vizit

https://www.biovista.com/vizit/
1•vasvir•2m ago•1 comments

Httpxyz One Month In

https://tildeweb.nl/~michiel/httpxyz-one-month-in.html
1•birdculture•3m ago•0 comments

Show HN: AI-clean – strip unwanted formatting from text copied out of AI CLIs

https://ai-clean.dev
1•TheAndruu•3m ago•0 comments

The EU Comm. is turning Google Search into a privacy and national-security risk

https://blog.lukaszolejnik.com/the-european-commission-is-turning-google-search-into-a-privacy-an...
1•g-b-r•4m ago•1 comments

Making AI coding sessions persistent across agents

https://github.com/ShellFans-Kirin/drift_ai
1•rueichu_haung•5m ago•1 comments

I Forgot to Code

https://reggieescobar.com/blog/how-i-forgot-to-code
1•horatio_thomas•8m ago•0 comments

United Arab Emirates to quit oil cartel OPEC

https://www.bbc.co.uk/news/articles/cj4pxwlr52yo
3•mattcollins•8m ago•0 comments

Tencent, Alibaba to back DeepSeek at $20B+ valuation

https://techfundingnews.com/deepseek-20b-valuation-tencent-alibaba-first-funding-round/
2•gmays•8m ago•0 comments

State of Open Source Report

https://opensource.org/blog/the-2026-state-of-open-source-report
1•pentagrama•8m ago•0 comments

ZenTrack: Notes, finance, streaks and health tracker

https://apps.apple.com/in/app/zentrack-habit-life-tracker/id6743366183
1•ShivanshDengla•9m ago•0 comments

OpenAI CEO's Identity Verification Company Announced Fake Bruno Mars Partnership

https://www.vice.com/en/article/openai-ceo-identity-verification-company-fake-bruno-mars-partners...
2•BoggleOhYeah•9m ago•0 comments

GTK2-NG: A community effort to revive and modernize GTK2

https://git.devuan.org/Daemonratte/gtk2-ng
1•validatori•10m ago•0 comments

Show HN: Live Sun and Moon Dashboard with NASA Footage

https://www.lumara-space.app/
1•beeswaxpat•10m ago•0 comments

Southwest introduces Independence One livery

https://www.flightradar24.com/blog/aviation-news/airline-news/southwest-introduces-independence-o...
1•salkahfi•10m ago•0 comments

Ask HN: Can some C++ Hackers help me refine Open Source SlothDB

1•souravroy78•10m ago•0 comments

Survey of IaC Tools Used to Manage AWS

https://newsletter.masterpoint.io/p/survey-of-iac-tools-used-to-manage-aws
1•mooreds•12m ago•0 comments

DeepSeek Unveils Newest Flagship AI Model a Year After Upending Silicon Valley

https://www.bloomberg.com/news/articles/2026-04-24/deepseek-unveils-newest-flagship-a-year-after-...
1•gmays•14m ago•0 comments

Prompt–Response AI is a local maximum. The next paradigm looks nothing like it

https://samxgreenfield.substack.com/p/current-ai-arthitecture-is-inherently
1•samgreenfield•14m ago•0 comments

How to audit what ChatGPT knows about you – and reclaim your data privacy

https://www.zdnet.com/article/chatgpt-privacy-settings-guide/
1•speckx•14m ago•0 comments

All FOSDEM 2026 videos are online

https://fosdem.org/2026/news/2026-04-26-all-videos-published/
1•Tomte•15m ago•0 comments

Lenovo buys Phoenix Technologies' firmware business

https://news.lenovo.com/pressroom/press-releases/lenovo-completes-acquisition-of-phoenix-technolo...
3•WalterSobchak•15m ago•0 comments

GitHub shipped a compliant MCP server. Most authors can't

https://github.com/korrel-dev/mcp-audits/tree/main/audits/github
2•issazangana•17m ago•0 comments

Pgrust update: at 67% Postgres compatibility, and accelerating

https://malisper.me/pgrust-update-at-67-postgres-compatibility-and-accelerating/
2•nicholasjbs•17m ago•0 comments

Notion Palette – Custom Notion Colors and Themes

https://notionpalette.com/
1•qwikhost•18m ago•0 comments

UAE Leaves OPEC and OPEC+

https://www.reuters.com/markets/commodities/uae-says-it-quits-opec-opec-statement-2026-04-28/
11•TechTechTech•22m ago•0 comments

A Time Traveling Superintelligent AI tried to warn about correspondence dinner

https://www.404media.co/did-a-time-traveling-superintelligent-ai-try-to-warn-about-white-house-co...
2•SpyCoder77•22m ago•1 comments

Newly Deciphered Sabotage Malware May Have Targeted Iran's Nuclear Program

https://www.wired.com/story/fast16-malware-stuxnet-precursor-iran-nuclear-attack/
2•01-_-•23m ago•0 comments

The Angine de Poitrine Argument for UBI

https://www.scottsantens.com/the-angine-de-poitrine-argument-for-ubi/
1•nhatcher•23m ago•0 comments