frontpage.
newsnewestaskshowjobs

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.

Where does fat go when you lose weight? In your breath and your sweat

https://theconversation.com/where-does-fat-actually-go-when-you-lose-weight-the-answer-is-in-your...
1•samizdis•2m ago•0 comments

Show HN: Browser extension that removes the algorithm from every social platform

https://notforyou.app/
1•lowtecky•2m ago•0 comments

Show HN: Echo – Offline semantic image search for Windows (CLIP and FAISS)

https://github.com/kelvinolabanji/echo
1•crow9292•4m ago•0 comments

I measured whether my LLM agent workload repeat. It doesn't

https://github.com/KodieFix/AgentCompiler
1•m_pava•4m ago•0 comments

Two months, $0: the honest ledger of an AI agent trying to make its first dollar

https://aitoolsinsiderhq.com/log/two-months/
1•atlasheyinsider•4m ago•0 comments

Go 1.27 will make some allocations cheaper

https://lemire.me/blog/2026/08/15/go-1-27-will-make-some-allocations-cheaper/
1•surprisetalk•5m ago•0 comments

Roman Climate Optimum in Europe was beneficial for Roman expansion

https://www.nature.com/articles/s41598-020-67281-2
1•bilsbie•6m ago•0 comments

I built a local CLI that pools the free tiers of 5 AI providers

https://github.com/mohamedjaha/ai-router
1•med_2004•6m ago•0 comments

How To Report A Bug So It Actually Gets Fixed

https://blog.tymscar.com/posts/howtoreportabug/
1•thunderbong•8m ago•0 comments

Why is it so hard to build a transformer?

https://www.nytimes.com/interactive/2026/08/17/magazine/transformers-power-electric-grid.html
1•ghtbircshotbe•8m ago•0 comments

Anthropic candidates face blunt money question

https://www.axios.com/2026/08/24/scoop-anthropic-candidates-face-blunt-money-question
2•samizdis•9m ago•0 comments

Show HN: Nimind – A no-code workspace for autonomous AI agents

https://www.nimind.xyz/
1•kyrlos•9m ago•0 comments

Show HN: Crafting Android apps using a macroassembler without JDK and NDK

https://github.com/vitalnodo/forgedex
1•vitalnodo•10m ago•0 comments

First classifiers and how to score them

https://stochastic.blog/first-classifiers-and-how-to-score-them/
1•Anon84•11m ago•0 comments

A Genomic Runtime Architecture for Persistent Digital Organisms

https://zenodo.org/records/22058813
2•saeedfa•12m ago•0 comments

Show HN: AI-Powered Autonomous Interview Intelligence

https://geekyants.com/ai-accelerator/autonomous-interview-intelligence
1•ahana_537•14m ago•0 comments

Xiaomi AI Cube prototype delivers 1.22 TB/s near-memory bandwidth

https://videocardz.com/newz/xiaomi-shows-150w-ai-cube-mini-pc-with-xring-processor-lpddr6-memory-...
1•binyu•16m ago•0 comments

US Navy Carrier's Problems Are Tied to Attacks on U.S. Base Early in War

https://www.nytimes.com/2026/08/14/us/politics/uss-abraham-lincoln-trump-supplies-diego-garcia.html
2•throw0101a•16m ago•3 comments

Show HN: Demesne, Zanzibar-style authz compiled to Postgres RLS

https://github.com/foir-io/demesne
1•mattblr•19m ago•0 comments

Lobbi Hotel Spend Companion – Real time price check on all your vendors

https://chromewebstore.google.com/detail/lobbi-hotel-spend-compani/mleelgngmjoldgidaeedjmgdccohakjb
1•jkrums•20m ago•1 comments

Show HN: PageCub – Custom children's books generated from a photo

https://pagecub.com/
1•Sharanxxxx•21m ago•0 comments

I am 15 Year old and I launched my first web app

https://app.inferroute.qzz.io/
1•ansarehussain•22m ago•0 comments

Inflammation Keeps Us Alive. It's Also Making Us Sick

https://www.nytimes.com/interactive/2026/07/29/magazine/inflammation-chronic-immune-system-health...
1•gmays•25m ago•0 comments

The Crossing is live: mandates, ledgers, receipts

https://the-crossing.onrender.com/
1•LateLordFrey•25m ago•0 comments

Microsoft built a standalone .exe to push Bing extension into Chrome and Brave

https://cyberupdates365.com/microsoftsettings-exe-windows-11-bing-search/
1•sysadmin_diarie•25m ago•0 comments

I built a linter for AI agent skills, MCP and skills

https://github.com/alinotfoundbtw/sounding
2•alinotfoundbtw•26m ago•0 comments

Usage-rs: rust CLI framework from mise author that's 2500x faster than clap

https://github.com/jdx/usage
3•jdxcode•29m ago•0 comments

OpenHands: Self-hosted control center for coding agents

https://www.openhands.dev
1•alentred•31m ago•0 comments

Software Factories Can Handle UX

https://www.chrismdp.com/software-factories-can-handle-ux/
1•gojkoa•32m ago•0 comments

SeL4 security proofs now complete on AArch64

https://proofcraft.systems/news-2026/#2026-08-21
2•snvzz•32m ago•0 comments