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

Comments

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

LLM Wiki

https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
1•tamnd•1m ago•0 comments

Razer Wolverine V3 Pro and Betop KP50 Controllers to Be Supported by Linux 7.0

https://www.phoronix.com/news/Linux-7.0-rc7-Input-Fixes
1•doener•2m ago•0 comments

Neovim TreeSitter plugin has been archived on GitHub

https://github.com/nvim-treesitter/nvim-treesitter
2•ComputerGuru•3m ago•1 comments

FAA prohibits SFO's parallel approaches

https://www.reuters.com/world/us/faa-imposes-restrictions-some-landings-san-francisco-airport-202...
1•elromulous•3m ago•0 comments

Show HN: Trading harness for Indian stock market

https://github.com/hopit-ai/india-trade-cli
1•Arkid•4m ago•0 comments

Why the Most Valuable Things You Know Are Things You Cannot Say

https://deadneurons.substack.com/p/why-the-most-valuable-things-you
2•nr378•9m ago•0 comments

Show HN: DocMason – Agent Knowledge Base for local complex office files

https://github.com/jetxu-llm/docmason
2•Jet_Xu•9m ago•0 comments

Turn safety data sheets into structured JSON via API

https://turninto.dev/
1•VelaA•11m ago•0 comments

Gemma 4 running client-side in WebGPU

https://huggingface.co/spaces/webml-community/Gemma-4-WebGPU
4•astlouis44•11m ago•0 comments

Neuronal APOE4-induced early hippocampal hyperexcitability in Alzheimers disease

https://www.nature.com/articles/s43587-026-01096-0
1•bookofjoe•12m ago•0 comments

Show HN: A game where you build a GPU

https://jaso1024.com/mvidia/
7•Jaso1024•13m ago•0 comments

12,000 AI-generated blog posts added in a single commit

https://github.com/OneUptime/blog/commit/30cd2384794c897d95aca77d173db44af51ca849
4•noslop•13m ago•0 comments

Meta: A Cautionary Tale [video]

https://www.youtube.com/watch?v=DNCQ5kV-cKs
1•raydev•14m ago•1 comments

Rust terminal projects in 3 years

https://blog.orhun.dev/800-rust-projects/
1•birdculture•15m ago•0 comments

What Happened with the Axios Compromise

https://twitter.com/aakashgupta/status/2040171739926393151
1•CPLX•16m ago•0 comments

Show HN: DocMason – AI Agent Knowledge Base for local complex office files

https://github.com/JetXu-LLM/DocMason
2•Jet_Xu•17m ago•0 comments

GB Renewables Map

https://renewables-map.robinhawkes.com/#5/55/-3.2
1•DamonHD•18m ago•0 comments

There Is a RAM Shortage

https://www.npr.org/2026/02/21/nx-s1-5719256/theres-a-shortage-of-ram-computer-memory-how-is-this...
3•paulpauper•20m ago•0 comments

Tokens: The New Oil – By Kent Beck

https://tidyfirst.substack.com/p/tokens-the-new-oil
3•paulpauper•20m ago•0 comments

Show HN: Termtrace – Record and replay terminal sessions as traces

1•amalChandru•20m ago•0 comments

Six Flags Was a Summer Destination. Can It Win Families Back?

https://www.nytimes.com/2026/04/02/business/six-flags-parks-closing-debt-attendance.html
1•duxup•23m ago•3 comments

In the Gulf, GPS jamming leaves delivery drivers navigating blind

https://restofworld.org/2026/gps-disruption-gulf-gig-workers/
2•donohoe•23m ago•0 comments

Show HN: SFS – A FUSE-based filesystem with SSH transport writen in Rust

https://github.com/skorotkiewicz/sfs
2•modinfo•25m ago•0 comments

Carbible.net: Car Guide

https://carbible.net/
1•polyspora•25m ago•1 comments

Iran is a distraction [video]

https://www.youtube.com/watch?v=koa2wUeWJL8
1•teleforce•26m ago•0 comments

Milgram's subjects were never aligned

https://hollisrobbinsanecdotal.substack.com/p/milgrams-subjects-were-never-aligned
1•mattas•27m ago•0 comments

What an Ivy League Education Gets You

https://www.theatlantic.com/ideas/2026/04/ivy-league-education-income/686682/
2•paulpauper•27m ago•1 comments

Octopus Energy's Agile Prices

https://agileprices.co.uk/
4•jonatron•27m ago•0 comments

How much it costs to attend a game at every MLB ballpark

https://visityourteam.com/mlb/rankings/game-day-costs
1•smarthomeu•28m ago•0 comments

Show HN: Detect7 – automatic DDoS protection layered on Cloudflare

https://detect7.com/
1•rk-baku•28m ago•0 comments