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.

Show HN: Quantum Temporal Cryptography – spec for interplanetary trust chains

https://zenodo.org/records/19770184
1•vibeagentmaking•7m ago•0 comments

Boats crash/break and can kill their passengers when falling certain distances

https://bugs.mojang.com/browse/MC/issues/MC-119369
2•zdw•11m ago•0 comments

Show HN: Talisman – A Android instrument played with two thumbs

https://talisman.by-igor.com/
1•ycosynot•11m ago•1 comments

Father warns of extremist network 764 after his daughter was 'groomed' on Roblox

https://nationalpost.com/news/canada/b-c-father-warns-of-extremist-online-network-764-after-his-d...
3•qwertyuiop_•12m ago•1 comments

Reconnecting a Post-Pandemic World

https://github.com/DaBena/Brezn
1•brezn•15m ago•1 comments

Pyptx – Write PTX Kernels in Python

https://github.com/patrick-toulme/pyptx
2•bobrenjc93•17m ago•0 comments

Show HN: LoreData – generate lore-accurate personas from pop culture universes

https://loredata.orchidfiles.com/
1•theorchid•18m ago•0 comments

Ask HN: Is anyone using Zoho, Lark or Proton?

1•wasimsk•20m ago•1 comments

Blog prize for big questions about AI

https://www.dwarkesh.com/p/blog-prize
1•gmays•20m ago•0 comments

The Professors Are Using ChatGPT, and Some Students Aren't Happy About It

https://www.nytimes.com/2025/05/14/technology/chatgpt-college-professors.html
1•coldsunrays•23m ago•0 comments

Show HN: Routiium – self-hosted LLM gateway with a tool-result guard

https://github.com/labiium/routiium
1•deadpixel•23m ago•0 comments

Agent-World: Scaling RW Environment Synthesis for General Agent Intelligence

https://agent-tars-world.github.io/-/
1•gmays•24m ago•0 comments

Context Is Finite. Who Maintains It?

https://blog.gchinis.com/posts/2026/04/self-organizing-agents/
1•gchinis•24m ago•0 comments

Release PiClaw v2.0.1 – Ferrix

https://github.com/rcarmo/piclaw/releases/tag/v2.0.1
1•rcarmo•28m ago•0 comments

Trump ousts National Science Board members

https://www.washingtonpost.com/science/2026/04/25/national-science-board-members-dismissed/
6•acdha•29m ago•0 comments

Is the World Ready for a Car Without a Rear Window?

https://www.wsj.com/lifestyle/cars/polestar-4-dan-neil-review-407f11a6
1•bookofjoe•32m ago•1 comments

Why your AI assistant is suddenly selling to you

https://www.economist.com/business/2026/04/19/why-your-ai-assistant-is-suddenly-selling-to-you
2•edward•32m ago•0 comments

Automate TLS for Dynamic Domains with Traefik and Hetzner DNS

https://matija.eu/posts/dynamic-domain-certs-traefik-hetzner/
1•mmunj•33m ago•0 comments

AI Might Be Lying to Your Boss

https://williamoconnell.me/blog/post/ai-ide/
4•annjose•34m ago•0 comments

Go quirks: function closures capturing mutable references

https://rednafi.com/go/closure-mutable-refs/
1•Brajeshwar•34m ago•0 comments

Can you stop beans from making you gassy?

https://www.seriouseats.com/how-to-reduce-bean-gas-tested-11883862
1•jstrieb•36m ago•0 comments

Show HN: The Order of the Agents – Make Codex and Claude Create the Perfect PRD

https://github.com/btahir/agent-order
2•bilater•39m ago•0 comments

RFC: Oden: The Server-First, JavaScript-Esque Runtime

https://rfchub.com/phobos/rfc5-oden-the-server-first-javascript-esque-runtime
1•tlhunter•42m ago•0 comments

The U.K. Smoking Ban Is Illiberal

https://www.theatlantic.com/ideas/2026/04/case-against-uk-smoking-ban/686949/
4•JumpCrisscross•42m ago•1 comments

Building Semantic Version Control in Rust

https://therohansharma.com/semantic-version-control-rust
2•lukastyrychtr•44m ago•0 comments

Logs say success. The system says otherwise

https://blog.bridgexapi.io/why-your-logs-say-everything-worked-even-when-it-didnt
1•Bridgexapi•45m ago•1 comments

Show HN: Good AI Task – a tool for asking AI what it can and can't do

https://goodaitask.com
2•jmt710•46m ago•0 comments

Nicholas Carlini – Black-hat LLMs [video]

https://www.youtube.com/watch?v=1sd26pWhfmg
9•simonebrunozzi•49m ago•0 comments

Show HN: Useknockout open source background removal API 40× cheaper -remove.bg

https://github.com/useknockout/api
3•tlorents•50m ago•0 comments

Show HN: AI Visibility Monitor – Track if your site gets cited by GPT/Claude

https://github.com/WorkSmartAI-alt/ai-visibility-monitor
4•balance006•50m ago•0 comments