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•10mo ago

Comments

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

Team simulates a living cell that grows and divides

https://news.illinois.edu/team-simulates-a-living-cell-that-grows-and-divides/
1•geox•1m ago•0 comments

The internet has no attribution layer for viral content

1•Proofmeme•5m ago•0 comments

Astronomers discover long-period radio transient of unknown origin

https://phys.org/news/2026-03-astronomers-period-radio-transient-unknown.html
1•wglb•8m ago•1 comments

As of today, Brazil requires identity verification to use social media

https://twitter.com/ProtonVPN/status/2033990861843726682
2•absqueued•11m ago•0 comments

Show HN: ToolGuard – Pytest for AI agent tool calls

1•Heer_J•14m ago•0 comments

5-Minute Agent Setup with Microsoft AI Toolkit (VS Code, March 2026 Update)

https://insider.dforge.ca/issues/2026-03-16/#steal-this
1•mcdoolz•14m ago•0 comments

Show HN: Lytok v3.0.1 – A high-density data protocol (JSON alternative)

https://github.com/lytok/lytok-js
2•joguel96•15m ago•0 comments

Microplastics Discovered in Prostate Tumors

https://medicalxpress.com/news/2026-02-microplastics-prostate-tumors.html
1•PaulHoule•16m ago•0 comments

Show HN: Xecai, a minimal Python interface for LLM providers for RAG systems

https://github.com/AdrianVispalia/xecai
1•adrianvi•17m ago•0 comments

Boeing 929 Jetfoil

https://en.wikipedia.org/wiki/Boeing_929_Jetfoil
2•WorldPeas•18m ago•0 comments

Toward autonomous self-organizing biological robots with a nervous system

https://wyss.harvard.edu/news/toward-autonomous-self-organizing-biological-robots-with-a-nervous-...
2•KenRuf•19m ago•0 comments

What's your biggest challenge as a founder?

1•bysyd•20m ago•2 comments

The LCA problem revisited [pdf]

https://www3.cs.stonybrook.edu/~bender/talks/BenderFa00-lca-talk.pdf
1•remywang•20m ago•1 comments

"Kai su, teknon" Caesar last words were probably a curse, not a farewell (2018)

https://www.lrb.co.uk/the-paper/v40/n23/thomas-jones/see-you-in-hell-punk
2•kwikiel•23m ago•0 comments

Ex-Uber self-driving chief crashes his Tesla on FSD, exposes supervision snafu

https://electrek.co/2026/03/17/former-uber-self-driving-chief-tesla-fsd-crash-supervision-problem/
1•aanet•23m ago•1 comments

Show HN: The elegant type-safe module composable library

https://arc.tsdk.dev/
1•jeremy_su•25m ago•0 comments

Jane (Jane.app) – Senior+ Engineers with AI Infra exp – Remote (US/Canada)

https://www.notion.so/janeapp/Jane-ai-2ee378ecd68380c8a9afc7f8ebee7b0f
1•keiranmcooper•26m ago•1 comments

PvZ-Portable: A cross-platform reimplementation of Plants vs. Zombies

https://github.com/wszqkzqk/PvZ-Portable
1•fastily•30m ago•0 comments

I made an automatic OG meta image system

https://snapog.com
1•earonesty•31m ago•1 comments

Chris Collins Reveals Amiga Devbench – Next-Level Amiga Development [video]

https://www.youtube.com/watch?v=kr4x3YnE-Ws
1•doener•31m ago•0 comments

I Don't Know, Timmy, Being God Is a Big Responsibility

https://qntm.org/responsibility
2•stickynotememo•33m ago•0 comments

2 Years Ago I Decided to Pay for My Search Engine. I've Never Looked Back

2•moebius_ansa•34m ago•0 comments

How the Strait of Hormuz closure affects global oil supply

https://www.reuters.com/graphics/IRAN-CRISIS/OIL-LNG/mopaokxlypa/
1•doener•36m ago•0 comments

Q&A: What does the Iran war mean for the energy transition and climate action?

https://www.carbonbrief.org/qa-what-does-the-iran-war-mean-for-the-energy-transition-and-climate-...
1•doener•36m ago•0 comments

Benchmark: TanStack Start is now the fastest full stack React framework

https://blog.platformatic.dev/react-ssr-framework-benchmark-tanstack-start-react-router-nextjs
1•flyaway123•37m ago•0 comments

AI Tools Can Help with Legal History Research

https://reason.com/volokh/2026/03/17/how-ai-tools-can-help-with-legal-history-research/
1•treetalker•41m ago•0 comments

Show HN: Shadcn/UI for Blazor

https://blazor-shadcn.fly.dev
2•Justbeingjustin•41m ago•1 comments

I stopped writing prompts and built an operating system on top of Claude Code

https://medium.com/@assaf_85431/i-stopped-writing-prompts-i-built-an-operating-system-instead-b7a...
1•Assafkip•42m ago•0 comments

JPMorgan Morgan halts $5.3B Qualtrics debt deal as AI fears chill demand

https://www.ft.com/content/ce9a67da-62df-484e-9f50-075d4be7817f
3•petethomas•43m ago•0 comments

Show HN: CodeLedger – deterministic context and guardrails for AI

https://codeledger.dev
1•ashmivante•43m ago•0 comments