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.

Tools and toolbelt for you and your agent

https://wyreup.com/
2•tamler•46s ago•0 comments

The Benefits of Rain

https://mainbrella.com/blog/the-benefits-of-rain/
2•andrewfromx•1m ago•0 comments

Explaining the Magelight XP Glitch in Skyrim

https://blog.alexbeals.com/posts/explaining-the-magelight-xp-glitch-in-skyrim
1•davikr•4m ago•0 comments

Rust Port of TypeScript (Tsc)

https://github.com/pingdotgg/ts-rust
2•jcbhmr•9m ago•0 comments

Medical World Models

https://arxiv.org/abs/2606.16721
1•brandonb•9m ago•0 comments

2/3rds of MiMo v2.6's Coding Tasks Leak the Answer. Is Exploiting It Cheating?

https://www.vals.ai/blogs/mimo-reward-hacking
6•miyukimatthews•10m ago•1 comments

OpenAI's human rights lead: What military AI could do 'keeps me up at night'

https://fortune.com/2026/10/06/openai-human-rights-lead-sarah-yager-military-ai-use-concerns/
1•snarky-comments•12m ago•0 comments

Animals may have evolved 200M years earlier than we thought

https://www.sciencedaily.com/releases/2026/10/261003234023.htm
1•docmechanic•17m ago•0 comments

Preorder Microsoft Surface RTX Spark Dev Box – Starting at $5,999.99

https://www.microsoft.com/en-us/store/configure/surface-rtx-spark-dev-box/8wg5vqp0x4gr
3•canucker2016•22m ago•3 comments

OpenAI tricked me into switching to a business account

1•probolsky•27m ago•0 comments

Why Do We Need Human Anything Anymore?

https://poshenloh.com/posts/20260919-math-ai
2•nopinsight•27m ago•0 comments

Catching Crumbs from the Table [pdf]

https://gwern.net/doc/fiction/science-fiction/2000-chiang.pdf
3•qingcharles•30m ago•0 comments

EU drops sponsorship of disinformation conference at Trump officials' request

https://www.theguardian.com/us-news/2026/oct/07/trump-eu-disinformation-conference
8•rdmuser•36m ago•0 comments

Why Isn't the Industry Freaking Out About DeepSeek 4.1 Flash?

https://www.dgt.is/blog/2026-10-07-deepseek-freek-out/
4•jonotime•40m ago•0 comments

Zpu

https://github.com/zylin/zpu
4•kristianpaul•40m ago•0 comments

AI cluster networking reading list: RDMA, collectives, fabrics

https://github.com/Rewsr/unawesome-ai-fabric-engineering
4•rewsiest•40m ago•0 comments

How to "Tell It Like It Is" More Effectively

https://mgrebler.substack.com/p/how-to-tell-it-like-it-is-more-effectively
4•mgrebler•45m ago•0 comments

Hackers hijack Google domains after breaching ccTLD registries

https://www.bleepingcomputer.com/news/security/hackers-hijack-google-domains-after-breaching-cctl...
4•sbulaev•48m ago•0 comments

100 days later: Microsoft still steers Windows and Copilot users to Edge

https://blog.mozilla.org/en/mozilla/over-the-edge-2-100-days-later/
7•thimabi•48m ago•1 comments

Bold AI developer takes aim at Adobe with open source clones

https://arstechnica.com/ai/2026/10/software-is-over-bold-ai-developer-takes-aim-at-adobe-with-ope...
5•pseudolus•49m ago•0 comments

AHM Statement on OpenAI's October 6 Release of Mathematical Documents

https://terrytao.wordpress.com/2026/10/07/ahm-statement-on-openais-october-6-release-of-mathemati...
5•smilelamp•50m ago•4 comments

Amazon employees hit by fresh job cuts across several teams

https://www.businessinsider.com/amazon-layoffs-hit-hundreds-of-employees-across-multiple-teams-20...
7•christhecaribou•51m ago•0 comments

Possible plague death at a Siberian lab baffles scientists

https://www.science.org/content/article/possible-plague-death-siberian-lab-baffles-scientists
3•doener•53m ago•0 comments

Learning cardiac dynamics via action-conditioned JEPAs

https://arxiv.org/abs/2604.22618
2•brandonb•55m ago•0 comments

What is the actual percentage of people For and Against AI?

6•Zeruxe•1h ago•29 comments

Goose: Safer, faster and <memory than Rust/C++ for algos where flat data matters

https://github.com/aardappel/goose/blob/master/README.md
5•bobbydigitales•1h ago•1 comments

Priceline to face FTC action over deceptive hotel ads

https://www.reuters.com/world/priceline-owner-face-ftc-action-over-affiliates-hotel-ads-sources-s...
3•JumpCrisscross•1h ago•0 comments

Neural Dynamics as the Composition of Quantized Units

https://arxiv.org/abs/2609.32487
1•brandonb•1h ago•0 comments

Map of USENET in 1986

https://twitter.com/0xtechnexus/status/2107954052927746241
2•bigwheels•1h ago•0 comments

BizGap – Automated lead generation from Google Maps

https://www.bizgap.online/
1•flaviorodrigues•1h ago•1 comments