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.

Slate Auto's simple electric truck starts at $24,950

https://techcrunch.com/2026/06/24/slate-autos-radically-simple-electric-truck-starts-at-24950/
1•tjwds•2m ago•0 comments

Claude Shannon: A Mathematical Theory of Cryptography

https://evervault.com/papers/shannon
1•ShaneCurran•3m ago•0 comments

Elon Musk denies Tesla's Autopilot caused crash that killed grandmother

https://arstechnica.com/tech-policy/2026/06/elon-musk-denies-teslas-autopilot-caused-crash-that-k...
2•worik•4m ago•1 comments

AI IQ Bio

https://www.aiiq.org/bio/
1•shea256•5m ago•0 comments

WebKit in Safari 27 Beta

https://webkit.org/blog/17967/news-from-wwdc26-webkit-in-safari-27-beta/
2•SllX•6m ago•0 comments

Find an open source alternative to anything

https://opensource.builders/
1•momentmaker•6m ago•0 comments

Meta pauses employee tracker for AI training amid privacy concerns

https://www.theguardian.com/technology/2026/jun/24/meta-pauses-employee-tracker-for-ai-training-a...
1•iamflimflam1•6m ago•0 comments

WikiHouse is a modular system for high performance, zero-carbon buildings

https://www.wikihouse.cc
1•momentmaker•9m ago•0 comments

A startup claims it broke through a bottleneck that's holding back LLMs

https://www.technologyreview.com/2026/06/19/1139313/a-startup-claims-it-broke-through-a-bottlenec...
1•theanonymousone•10m ago•0 comments

Show HN: Agents report broken docs, you get a GitHub issue

https://fixyourdocs.io/
1•mstopa•10m ago•0 comments

Show HN: Turn images into audio that can be decoded with a spectrogram

https://nsspot.herokuapp.com/imagetoaudio/
1•jupr•11m ago•0 comments

The quietest places in the loudest cities

https://earth.fm/the-quietest-places-in-the-worlds-loudest-cities/
2•momentmaker•12m ago•0 comments

Every AI Memory Benchmark Has an Asterisk

https://tenureai.dev/writing/every-ai-memory-benchmark-has-an-asterisk/
2•freewilly25•12m ago•0 comments

Are AI chatbots politically biased?

https://twitter.com/ianbremmer/status/2069744192230764723
4•MrBuddyCasino•13m ago•1 comments

An ECG biomarker for sudden cardiac death discovered with deep learning

https://www.nature.com/articles/s41586-026-10674-6
2•brandonb•13m ago•0 comments

Memory Allocator Game

https://surenenfiajyan.github.io/allocator/
1•senfiaj•15m ago•0 comments

The Stranger Who Changed My Life: A Short Love Story (2017)

https://www.rd.com/article/the-stranger-who-changed-my-life-short-love-story/
1•downbad_•15m ago•0 comments

The skills I think we might gain (AI)

https://blog.g9n.com/the-skills-i-think-we-might-gain-ai#decision-making-at-pace
1•gb2d_hn•15m ago•0 comments

Sovietrxiv: Rediscovering the Soviet scientific archive, in English

https://sovietrxiv.org
1•MrBuddyCasino•16m ago•0 comments

ClickFix 2026: Fake Captcha Hides C2 On-Chain

https://phisheye.com/blog/clickfix-2026-fake-captcha-etherhiding
1•naveenda•16m ago•0 comments

LA Kings Codex Data Engineer Senior Mid

https://aegworldwide.com/careers/jobs/KINGS9374/la-kings---sr.-data-engineer
1•jerryshi042003•16m ago•0 comments

Fluid Paint

https://david.li/paint/
3•helloplanets•17m ago•0 comments

U.S. Presses Meta to Agree to A.I. Reviews

https://www.nytimes.com/2026/06/23/business/meta-ai-government-reviews-security.html
2•gmays•19m ago•0 comments

Practical maximum clique search on 300–900 vertex graphs in a few seconds

https://mathoverflow.net/questions/512587/practical-maximum-clique-search-on-300-900-vertex-graph...
1•jjgreen•19m ago•0 comments

Russia's Wiki warfare tries to distort reality, documents show

https://www.japantimes.co.jp/news/2026/06/24/world/politics/russia-wiki-warfare/
9•billybuckwheat•19m ago•0 comments

Thoughts on Role Confusion

https://www.gilesthomas.com/2026/06/role-confusion
1•gpjt•21m ago•0 comments

Hackers Publish Knicks and Madison Square Garden Data Online

https://www.404media.co/hackers-publish-knicks-and-madison-square-garden-data-online/
1•jbegley•21m ago•0 comments

Reverse-skill: Trending agent skill pack with built-in refusal-suppression layer

https://github.com/zhaoxuya520/reverse-skill
1•cheekygeeky•23m ago•0 comments

Solving the Santa Claus concurrency puzzle

https://wyounas.github.io/puzzles/concurrency/2026/01/10/how-to-help-santa-claus-concurrently/
1•simplegeek•25m ago•0 comments

Thomann takes legal action against Fender

https://www.thomann.de/blog/en/inside/thomann-takes-legal-action-against-fender/
21•Audiophilip•27m ago•2 comments