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.

Hindsight – A design spec for self-improving LLM agents

https://github.com/anitiue/Hindsight
2•anitial•7m ago•0 comments

The Relationship Between Two People Is Not Located in Either Person

https://substack.com/home/post/p-193689282
2•problemist•10m ago•0 comments

Show HN: Dux, a TUI Agent Multiplexer

https://github.com/patrickdappollonio/dux
2•pdappollonio•12m ago•0 comments

Google "6-7"

https://www.google.com/search?hl=en&q=6%207
2•afshinmeh•16m ago•1 comments

go-libghostty: Go bindings for libghostty-vt

https://github.com/mitchellh/go-libghostty
1•doppp•24m ago•0 comments

Phaser 4

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

The Language After Its Collapse

https://medium.com/luminasticity/the-language-after-its-collapse-119eb8a7b7fc
1•bryanrasmussen•28m ago•0 comments

Selecting a Date Range in CSS

https://css-tricks.com/selecting-a-date-range-in-css/
2•ms7892•28m ago•0 comments

Government seeks X Community Notes oversight with IT Rules tweaks

https://www.hindustantimes.com/india-news/government-seeks-x-community-notes-oversight-with-it-ru...
2•c420•32m ago•0 comments

Brief: Bitcoin Core Governance Analysis

https://github.com/bitcoin/bitcoin/issues/35055
2•vinniefalco•46m ago•0 comments

20 Years on AWS and Never Not My Job

https://www.daemonology.net/blog/2026-04-11-20-years-on-AWS-and-never-not-my-job.html
35•cperciva•46m ago•0 comments

Vinyl (nee Varnish) Cache – 20 years old and it is time to get serious(er)

https://vinyl-cache.org/organization/20-years.html
1•gurjeet•48m ago•0 comments

Productive Procrastination

https://www.maxvanijsselmuiden.nl/blog/productive-procrastination/
2•maxvij•56m ago•0 comments

Is algorithm still relevant in 2026

1•JasonHEIN•1h ago•0 comments

Splitting the Web (2023)

https://ploum.net/2023-08-01-splitting-the-web.html
1•0928374082•1h ago•0 comments

Cmdgraph – Document any structural CLI for humans and agents

https://github.com/haoliangyu/cmdgraph
3•haoliangyu•1h ago•0 comments

Great at gaming? US air traffic control wants you to apply

https://www.bbc.com/news/articles/ce84rvx0e6do
2•1659447091•1h ago•0 comments

Austin's drop in rents explains housing in America

https://www.vox.com/future-perfect/485295/austin-national-rents-declining-yimby
2•rawgabbit•1h ago•4 comments

Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

https://arxiv.org/abs/2604.07902
3•matt_d•1h ago•0 comments

Unionized ProPublica staff are on strike over AI, layoffs, and wages

https://www.theverge.com/news/908401/propublica-union-strike-negotiations-ai-layoffs
2•pabs3•1h ago•0 comments

A 1KB zero-dependency relative time formatter for UI systems

https://github.com/taman-islam/human-time
1•hedayet•1h ago•0 comments

Your next 10 hires won't be human

https://github.com/multica-ai/multica
2•mercat•1h ago•1 comments

Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline

https://socket.dev/blog/axios-supply-chain-attack-reaches-openai-macos-signing-pipeline-forces-ce...
3•salkahfi•1h ago•1 comments

Gauss's Easter Algorithm

https://en.wikipedia.org/wiki/Date_of_Easter
1•ughitsaaron•1h ago•0 comments

The Seasons Are Wrong

https://kentwalters.com/posts/seasons/
2•NikxDa•1h ago•4 comments

Slately AI - All The Top Tier Models In One Place

https://slately.art
2•JonBoyd•1h ago•0 comments

What's the most painful sting in the world?

https://www.bbc.com/future/article/20260406-whats-the-most-painful-sting-in-the-world
1•rolph•1h ago•1 comments

Unleashing the Advantage of Quantum AI

https://quantumfrontiers.com/2026/04/09/unleashing-the-advantage-of-quantum-ai/
2•gmays•2h ago•0 comments

We're heading for an AI-fueled 'dementia crisis,' brain scientist warns

https://nypost.com/2026/04/10/health/brain-scientist-warns-were-heading-for-ai-fueled-dementia-cr...
5•1vuio0pswjnm7•2h ago•1 comments

Is it possible to live without killing?(2024)

https://worldbuilding.stackexchange.com/questions/254210/is-it-possible-to-live-without-killing
1•num42•2h ago•0 comments