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

Comments

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

Three Sketches of ASL-4 Safety Case Components

https://alignment.anthropic.com/2024/safety-cases/
1•consumer451•1m ago•0 comments

Use skills smarter with SkillDock's CLI manager

https://skilldock.io/skill/skilldock/skilldock-cli-usage
1•eugeneevstafev•2m ago•0 comments

Index, Count, Offset, Size

https://tigerbeetle.com/blog/2026-02-16-index-count-offset-size/
1•cyndunlop•3m ago•0 comments

I taught LLMs to play Magic: The Gathering against each other

https://mage-bench.com/
1•GregorStocks•3m ago•1 comments

Gentoo Takes the First Step to Ditch Microsoft Copilot-Infested GitHub

https://itsfoss.com/news/gentoo-github-switch-begins/
1•abdelhousni•3m ago•0 comments

I've Created Modular Open Source Shelters

https://thios.co/en/
1•pete-thios•3m ago•1 comments

StewReads – Turn Claude chats into Kindle ebooks

https://ankitgupta.dev/blog/building-stewreads
1•rajma•4m ago•1 comments

The Cloud Above the Clouds

https://subreply.com/reply/30957
1•lucianmarin•5m ago•0 comments

Metadata Is Not Understanding: Knowledge Graph Version Control for AI Code

https://hub.controlvector.io/blog/metadata-is-not-understanding
1•jwschmo218•7m ago•1 comments

Show HN: Deathwink – Send messages to people after you die

https://deathwink.com
1•randallme•7m ago•0 comments

Mac is now a gaming PC

https://xcancel.com/mygamesir/status/2022959064632938560
1•frizlab•8m ago•1 comments

Why Europe doesn't have a Tesla

https://worksinprogress.co/issue/why-europe-doesnt-have-a-tesla/
1•ortegaygasset•9m ago•0 comments

Baking Custom Images for AI Agents

https://olegselajev.substack.com/p/building-custom-docker-sandboxes
3•xenoscopic•9m ago•0 comments

AI Agent swarm for Stock trading simulation

https://github.com/dakshjain-1616/Stock-trading-Agent-Swarm---BY-NEO
1•gauravvij137•9m ago•1 comments

Show HN: Google rejected my privacy app for "low engagement"

1•safestream•10m ago•0 comments

Show HN: Mirroir – MCP server that gives AI agents a real iPhone to control

https://mirroir.dev
1•jfarcand•10m ago•0 comments

Molecular solar thermal energy storage in Dewar pyrimidone beyond 1.6 MJ/kg

https://www.science.org/doi/10.1126/science.aec6413
1•Forbo•10m ago•0 comments

Level of Detail

https://phinze.com/writing/level-of-detail
1•zdw•11m ago•0 comments

Dev implements HDMI FRL in AMDGPU, hence HDMI 2.1 on AMD Linux driver

https://github.com/mkopec/linux/tree/hdmi_frl_amd_staging
1•gbil•13m ago•0 comments

Logic MSO – Oscilloscope with Python Support

https://saleae.com/logic-mso
1•manchoz•13m ago•0 comments

Why AI writing is so generic, boring, and dangerous: Semantic ablation

https://www.theregister.com/2026/02/16/semantic_ablation_ai_writing/
2•benji8000•13m ago•0 comments

Show HN: Wit-ts – A type-level WIT parser for TypeScript

https://github.com/mattmarcello/wit-ts
1•mattmarcello•14m ago•0 comments

Where Does Gold Come From?

https://connordempsey.substack.com/p/where-does-gold-actually-come-from
4•cdempsey44•14m ago•0 comments

Show HN: My 16MB vibe-coded voice cloning app

https://github.com/blackboardsh/audio-tts
1•yoav•14m ago•0 comments

Intelligent AI Delegation

https://arxiv.org/abs/2602.11865
2•gmays•18m ago•0 comments

Show HN: Boolean-query-parser – From a 4-hour hack to 3k downloads

https://github.com/Piergiuseppe/boolean-query-parser
1•TheBuc•18m ago•1 comments

RCT: Vaporized cannabis versus placebo for acute migraine

https://headachejournal.onlinelibrary.wiley.com/doi/10.1111/head.70025
1•PaulHoule•18m ago•0 comments

Show HN: Local Voice Assistant

2•armcat•19m ago•0 comments

Sentinel – watch over your Tailscale network and notify of changes

https://github.com/jaxxstorm/sentinel
1•jaxxstorm•19m ago•0 comments

Temporal Raises $300M Series D to Make Agentic AI Real for Companies

https://temporal.io/news/temporal-raises-300M-to-make-agentic-ai-real-for-companies
3•eatonphil•19m ago•0 comments