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.

CVE-2026-106173: FortiSIEM gRPC Path Traversal RCE

https://horizon3.ai/attack-research/cve-2026-106173-deep-dive-fortisiem-grpc-path-traversal-file-...
1•frostbyte7•30s ago•0 comments

Turn any single player PC game into coop instantly

https://github.com/cranebeaker/coop-anything
1•vivzkestrel•3m ago•1 comments

ReactOS reaches major milestone with NTFS install support

https://arstechnica.com/information-technology/2026/10/reactos-reaches-major-milestone-with-ntfs-...
2•joozio•6m ago•0 comments

Grimoire for Biology

https://grimoire.bio
1•levmiseri•12m ago•0 comments

SpaceX and Tesla have formed committees to discuss potential merger, Musk

https://www.cnn.com/2026/10/20/business/spacex-tesla-merger-musk
1•pseudolus•15m ago•0 comments

Show HN: See AI trends heat up in real time

https://ai-news.jagular.io
2•jnaina•20m ago•0 comments

Ossdoctor – a health check for open source repos that fixes what's missing

https://github.com/jalensuggs77/ossdoctor
2•firstAu•22m ago•0 comments

Burbank's Real-Time Intelligence Center

https://burbank-ledger.pages.dev/articles/rtic-surveillance/
2•measurablefunc•22m ago•0 comments

Show HN: I spent two days building this online multiplayer game with Claude Code

https://pawnrush.xiaohan.dev/
3•hanstyle•23m ago•0 comments

Show HN: Grafista – AI graphic designer built to fight slop

https://grafista.io/
2•GiorgosGennaris•26m ago•0 comments

OnlyFans Creators Are Pissed That Meta Lets Muse Talk Dirty

https://www.wired.com/story/onlyfans-creators-are-pissed-that-meta-lets-muse-talk-dirty/
2•Topfi•27m ago•0 comments

Launch HN: Alter (YC S25) – Access control for multi-user agents

https://alterauth.com/
5•simfinii•27m ago•1 comments

Port of Coss.ui Components to Svelte

https://www.cossui-svelte.com/
2•orefalo•28m ago•0 comments

In Race with U.S., China Struggles to Recruit Foreign A.I. Researchers

https://www.nytimes.com/2026/10/06/science/china-ai-research-recruitment.html
2•gmays•28m ago•0 comments

Building a Custom 3D-Printed Micro Helicopter [video]

https://www.youtube.com/watch?v=8z4W0IoFQ4g
1•justathrow-321•31m ago•1 comments

Ask HN: What Does Noul Mean?

2•theanonymousone•32m ago•1 comments

Google DeepMind says four AI agents beat Minecraft in 27 hours

https://www.tomshardware.com/tech-industry/artificial-intelligence/google-deepmind-claims-four-ge...
1•jonbaer•32m ago•0 comments

A team of Gemini 4 Argon agents beats Minecraft

https://arxiv.org/abs/2610.22319
1•jonbaer•32m ago•0 comments

mini-Lean-Agent: A Coding-Agent Baseline for Lean

https://arxiv.org/abs/2610.17331
1•matt_d•36m ago•0 comments

Block Blast harvests its players for ad money

https://ayoships.com/breakdowns/block-blast
1•robin_reala•38m ago•0 comments

Jexxa Now Includes an Automatic Evaluation Suite

https://jexxa.org/
1•sankde•39m ago•1 comments

Stop training forecast models. Timeseries just went zero-shot

https://nitishagar.medium.com/stop-training-forecast-models-time-series-just-went-zero-shot-c7ff7...
1•nitishagar•47m ago•0 comments

PHP warns it plans to release 2 emergency patches imminently

https://arstechnica.com/security/2026/10/php-maintainers-tell-web-devs-to-prepare-themselves-for-...
2•jaredwiener•59m ago•1 comments

Giving AI video some Remembrance of things past

https://www.unite.ai/giving-ai-video-some-remembrance-of-things-past/
1•50kIters•1h ago•0 comments

Pragtical v3.14 Lua-based text editor adds menus, floating views, and sessions

https://pragtical.dev/blog/pragtical-v3140-release
1•rd07•1h ago•0 comments

MagicRoute: Routing Without Physical Routers

https://tailscale.com/blog/magicroute-beta
1•mfrw•1h ago•0 comments

World Classics: Modern Translations of the Iliad and Odyssey (EN, FR, DE, ES)

https://worldclassics.org/
1•epsteingpt•1h ago•1 comments

What Will Be Scarce

https://aleximas.substack.com/p/what-will-be-scarce
1•thewileyone•1h ago•0 comments

Omarchy made me rethink my Mac

https://cloudjourneyblog.rohi-lab.org/blog/summon-os
1•RohiRik•1h ago•2 comments

Static vs. dynamic tradeoffs – Rich Hickey (Clojure/Conj 2026) [video]

https://www.youtube.com/watch?v=P5eO7BNyJao
1•fmjrey•1h ago•1 comments