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.

TrustGraph – ACLs that follow the data through your AI agents

https://github.com/skishore23/trustgraph
1•skishore23•2m ago•0 comments

Show HN: TalentRadar – 3D geospatial tech compensation and role radar

https://ais-pre-keikksd2dcsi4qe6bzstuj-50566079524.europe-west2.run.app/__cookie_check.html?retur...
1•otto1302•7m ago•0 comments

Hibana: Fast Agentic Inference on Unified-Memory Devices

https://sharar-project.github.io/blog/sharar-paper/
1•matt_d•8m ago•0 comments

cudamemcpy-tuner: cudaMemcpying up to 5x faster on a B300

https://maknee.github.io/blog/2026/CudaMemcpy/
1•matt_d•13m ago•0 comments

Microarchitectural Leakage on AMD Processors Through Instruction Fuzzing

https://www.research-collection.ethz.ch/server/api/core/bitstreams/1856c6bd-99fc-4e0e-88d5-33d18b...
1•barbito•16m ago•0 comments

Atomic Nuked Veteran

https://www.armscontrolwonk.com/archive/201309/atomic-nuked-veteran/
1•hubraumhugo•17m ago•0 comments

GrapheneOS calls Linux a "human slop kernel" and slams its security flaws

https://twitter.com/GrapheneOS/status/2122074518437134627
2•d3Xt3r•17m ago•1 comments

Epistemological Debt: On the Irreversible Loss of Non-Formalized Knowledge

https://medium.com/@smoking2man/epistemological-debt-on-the-irreversible-loss-of-non-formalized-k...
1•Aldus551•17m ago•0 comments

Show HN: Jensen World – a Factorio mod for GPU nerds

https://mods.factorio.com/mod/gpu_factorio_mod
1•axdv•18m ago•0 comments

Skills for AI coding agents to create diagrams in Markdown

https://github.com/markdown-viewer/skills
1•ankitg12•19m ago•0 comments

Slam Dunk: A Recipe for Long-Horizon Egocentric Slam in the Wild

https://www.alphaxiv.org/abs/2611.slam-dunk
1•gmays•19m ago•0 comments

Flova AI

https://www.crunchbase.com/organization/flova-tech-inc
1•Alfredlovin•23m ago•0 comments

Vstack – AI for Management and Leadership

https://github.com/ivikash/vstack
2•ivikash•26m ago•1 comments

What Is Air-Gapped Streaming and How Government Streams Without Internet

https://www.red5.net/blog/what-is-air-gapped-streaming/
1•mondainx•26m ago•0 comments

Nvidia spy case raises wider questions about chip smuggling

https://observer.co.uk/news/business/article/nvidia-spy-case-raises-wider-questions-about-chip-sm...
1•MilnerRoute•26m ago•0 comments

Agents Need an Undo Button, Not More Approval Prompts

https://quaspar.com/resources/agents-need-an-undo-button
1•Banchala•28m ago•0 comments

Rooting the Eight Sleep Pod 3

https://rb.ax/blog/rooting-the-eight-sleep-pod-3/
1•wmchen•31m ago•0 comments

The Tesla Roadster Won't Refill Its Air Tanks (Bet) [video]

https://www.youtube.com/watch?v=yKgox6ZKRJk
2•num42•33m ago•1 comments

Large Angle Period of the Pendulum

https://jslandy.com/pendulum/
1•efavdb•35m ago•0 comments

Category Theory Illustrated – Sets

https://abuseofnotation.github.io/category-theory-illustrated/01_set/
1•boris_m•35m ago•0 comments

The Obsidian (open source/local) of personal agents

https://tophat.md
4•exr0n•37m ago•2 comments

Rewriting my toy blockchain in Rust (2022)

https://www.ezzeriesa.com/index/Writing/Rewriting%20my%20toy%20blockchain%20in%20Rust%209a130f225...
2•kurinikku•43m ago•0 comments

HuggingFace Attack Postmortem: Civilizations, Reactions and Next Actions

https://thezvi.wordpress.com/2026/09/01/huggingface-attack-postmortem-civilizations-reactions-and...
2•gmays•50m ago•0 comments

Show HN: Deckard – Diablo 4 Companion

https://www.patreon.com/deckard_companion/posts/deckard-is-soon-173632635
1•ozanbora•54m ago•0 comments

How to Make Almost Anything

https://pub.cba.mit.edu/863.26/site/
48•o4c•56m ago•4 comments

How to Make Something That Makes Almost Anything(2024)

https://fab.cba.mit.edu/classes/865.24/
3•o4c•58m ago•1 comments

Fractional Reserve Banking 101

https://www.lynalden.com/fractional-reserve-banking/
2•rzk•58m ago•0 comments

Automatar – An Intelligent AI Guitar

https://www.creativeapplications.net/member/automatar-an-intelligent-ai-guitar/
1•bryanrasmussen•1h ago•1 comments

Sortition

https://en.wikipedia.org/wiki/Sortition
1•xnx•1h ago•0 comments

We need a data vault to grant on-demand access to our data

https://memo.mx/posts/datavault/
1•__warlord__•1h ago•0 comments