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.

Whales copy trading on Polygoose

https://polygoose.xyz/en/
1•manofix•2m ago•0 comments

Show HN: I ported 11 model families to Apple's new on-device AI framework

https://github.com/john-rocky/coreai-model-zoo
1•mlboy•2m ago•0 comments

Show HN: LinkedIn Unfiltered – Turn AI slop into readable posts

https://github.com/kjhq/linkedin-unfiltered
1•thunderdrag•2m ago•0 comments

Personal Guardian Angel with LLM

https://gwern.net/guardian-angel
1•rickybule•4m ago•0 comments

We Cut Onboarding Time by 40% Using AI – Here's What We Did (Week 5 Roun

https://theaileverageweekly.com/posts/we-cut-onboarding-time-by-40-using-ai-here-s-exactly-what-w...
1•talvardi7•15m ago•0 comments

Genblaze: Open-Source Python SDK for Multi-Provider Generative Media Pipelines

https://www.backblaze.com/blog/introducing-genblaze-a-python-sdk-for-generative-media-pipelines/
1•LaSombra•17m ago•0 comments

Misenlac.es – Your bio link and URL shortener in one place

https://misenlac.es/es
1•david_rodriguez•18m ago•1 comments

SpaceX IPO makes Elon Musk the first trillionaire

https://www.reuters.com/business/media-telecom/spacex-ipo-makes-elon-musk-worlds-first-trillionai...
1•thomascountz•23m ago•1 comments

An Overpass QL interpreter using the QLever database

https://www.openstreetmap.org/user/Kai%20Johnson/diary/408849
1•altilunium•26m ago•0 comments

Ask HN: What is the difference between an IMU module and a smart motion sensor?

1•daischsensor•27m ago•0 comments

Italian bill on nuclear energy progressing through parliament

https://www.world-nuclear-news.org/articles/italian-bill-on-nuclear-energy-progresses-through-par...
2•omblivion•28m ago•0 comments

Dearhiringmanager.io Is Hiring a Full-Stack Developer (Remote)

https://dearhiringmanager.io
1•fcKarhuno•28m ago•0 comments

Construct's New 3D Editor

https://www.construct.net/en/blogs/construct-official-blog-1/introducing-constructs-new-3d-1902
1•AshleysBrain•31m ago•0 comments

Justification in Arabic Typesetting

https://doi.org/10.3998/3336451.0023.104
2•fanf2•34m ago•0 comments

Google Axion ARM Processors

https://cloud.google.com/products/axion
2•tosh•38m ago•0 comments

HP SSDs lose their performance after 7.5 years / integer overflow

https://support.hpe.com/connect/s/softwaredetails?language=en_US&collectionId=MTX-4cc24985bf9c485...
3•foosinn•39m ago•0 comments

AI Engineering the Acceleration Whiplash

https://www.faros.ai/blog/ai-acceleration-whiplash-takeaways
2•DareTheDev•39m ago•0 comments

Bumsrakete - CVE-2026-45257

https://bumsrake.de/
1•jbk•40m ago•0 comments

ClickHouse expands strategic collaboration with Google Cloud

https://clickhouse.com/blog/clickhouse-expands-strategic-collaboration-with-google-cloud
1•tosh•40m ago•0 comments

Gen Zers are arriving at college unable to even read a sentence

https://fortune.com/article/gen-z-college-students-struggling-to-read-books-professors-forced-to-...
2•jruohonen•42m ago•0 comments

Cat Hair Mustache Puzzle

https://en.wikipedia.org/wiki/Cat_hair_mustache_puzzle
1•LookAtThatBacon•46m ago•0 comments

chDB is an in-process OLAP SQL Engine powered by ClickHouse

https://github.com/chdb-io/chdb
1•tosh•47m ago•0 comments

CostLoop – track SaaS renewals and stop paying for forgotten subscriptions

https://costloop.app/blog/avoid-forgotten-saas-renewals/
1•Cech1337•48m ago•0 comments

Visible Boundaries Earn Trust

https://blog.vigilharbor.com/visible-boundaries-earn-trust
1•Calvin-Gibson•50m ago•1 comments

Apposters – Generate a full project website from a GitHub repository

https://apposters.com/
1•loeona•51m ago•0 comments

Kache – a zero-copy build cache for Rust

https://kunobi.ninja/blog/kache-v0-5-0
1•ainhoaa•56m ago•1 comments

NHS Replaces a&E Receptionists with iPads

https://www.telegraph.co.uk/news/2026/06/10/nhs-replaces-ae-receptionists-with-ipads/
4•ksec•57m ago•0 comments

Show HN: Recreate Thinking Machines 276B voice demo with duct tape and 8B model

https://github.com/kouhxp/cheap-im
1•mrkn1•59m ago•0 comments

KPMG report on benefits of AI contained AI hallucinations

https://www.ft.com/content/b3828e92-4961-4b39-84f0-c42f33be3c3f
2•calcifer•59m ago•1 comments

Show HN: Goloop – An agentic loop on your terminal

https://mantyx-io.github.io/goloop/
1•mantyx•1h ago•0 comments