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.

Show HN: Ensure your NYC apartment has no roaches, rats, leaks, or problems

https://apartmentfaxnyc.com/
1•YoungGato•23s ago•0 comments

NBA suspends Clippers owner Ballmer for 1 year in Kawhi Leonard salary cap probe

https://www.cnbc.com/2026/09/02/nba-suspends-clippers-ballmer-kawhi-leonard-salary-cap.html
1•ChrisArchitect•1m ago•0 comments

Go grandmaster Shin defeats AI KataGo in historic human victory

https://www.kedglobal.com/artificial-intelligence/newsView/ked202607210007
3•gmays•6m ago•0 comments

Photosynthesis – iPhone app combines photos from 2 lenses, out now

https://apps.apple.com/us/app/photosynthesis-camera/id6780102370
1•sajomes•7m ago•0 comments

You might be wrong about "The Year of Linux on the Desktop"

https://www.brachkow.com/notes/wrong-linux-framework-hype/
1•brachkow•10m ago•2 comments

The Largest Electric Aircraft Just Flew

https://www.ycombinator.com/library/Y6-the-world-s-largest-electric-aircraft-just-flew
2•sssilver•16m ago•0 comments

Climate change past the point of no return worst impacts are now unavoidable

https://www.cbc.ca/news/science/unep-climate-paris-global-warming-9.7329305
4•signa11•18m ago•1 comments

I read all the Star Wars books, and now I understand the prequels [video]

https://www.youtube.com/watch?v=26_IsLOGYX8
3•1317•21m ago•0 comments

Show HN: Competitive Language Learning (E-Sport)

https://thelingo.xyz
2•arjavmehta•22m ago•0 comments

US gov sides with OpenAI on issue of training LLMs on copyrighted material

https://techcrunch.com/2026/09/02/u-s-government-sides-with-openai-on-issue-of-training-llms-on-c...
7•joshka•24m ago•1 comments

Why Google Bid $10M for a Failed Airline's Data

https://time.com/article/2026/08/25/google-spirit-airlines-ai-data-RL/
4•alphabetatango•25m ago•1 comments

GPS Glitched Across US by as Much as 33 Feet. Scientists Have Never Seen Before

https://www.sciencealert.com/gps-glitched-across-the-us-by-as-much-as-33-feet-scientists-have-nev...
4•thread_id•29m ago•0 comments

Mr CMO

https://github.com/Mrabbi3/MR-CMO
1•rabbim750•31m ago•0 comments

Hot reload vLLM and sglang configs

https://github.com/numinous-technology/trimtab
1•joshkolo•32m ago•0 comments

FrontierHarness Eval benchmark. Pi is on the Pareto

https://runta.com/blog/introducing-frontierharness-eval/
2•redman25•33m ago•0 comments

What Happened to Borland? [video]

https://www.youtube.com/watch?v=HwkoaPl31Dw
3•mysticmode•37m ago•1 comments

The Library of Scott Alexandria

https://www.lesswrong.com/posts/vwqLfDfsHmiavFAGP/the-library-of-scott-alexandria
1•benatkin•41m ago•0 comments

Blast Radius

https://blastradius.dpdns.org/
1•codebyaditya•42m ago•0 comments

NameThatUI – What Is This UI Element Called?

https://namethatui.com
2•twalichiewicz•43m ago•0 comments

Show HN: DeltaCode – Pure AST beat Qwen's zvec-grep on our test (92% vs 48%)

https://github.com/aitrailblazer/deltacode-engine
1•thstart•45m ago•0 comments

Are Central Banks Moving Out of Dollar Assets?

https://libertystreeteconomics.newyorkfed.org/2026/09/are-central-banks-moving-out-of-dollar-assets/
2•jnord•46m ago•0 comments

AIStore at Multi-Petabyte Scale: NVMe versus HDD

https://docs.nvidia.com/aistore/blog/vs-hdds
1•marc__1•47m ago•0 comments

Finnish Sauna in Washington DC

https://www.saunajungle.com/
1•hubears•56m ago•0 comments

The Circular Debt Crisis Nobody Sees Coming [video]

https://www.youtube.com/watch?v=0ll9rEtoRrs
3•toomuchtodo•57m ago•0 comments

EclipseWise – Predictions for Solar and Lunar Eclipses

https://eclipsewise.com/eclipse.html
1•Mr_Minderbinder•1h ago•0 comments

Prioritization Is a Lie

https://jatabag.com/essays/prioritization-is-a-lie/
2•solaire_oa•1h ago•0 comments

Show HN: Redactle LLM Leaderboard

https://redactle.net/llm-leaderboard
4•pampas•1h ago•1 comments

The Marketing Buzzwords That Developers Hate

https://redis.io/blog/the-marketing-buzzwords-that-developers-hate/
1•ohjeez•1h ago•0 comments

SF dishwasher job posting offers $50 an hour

https://www.sfgate.com/food/article/pho-nguyen-dishwasher-sf-22411841.php
5•goldfishgold•1h ago•2 comments

It's a Great Time to Be Rich in New York

https://www.nytimes.com/2026/09/02/nyregion/new-york-income-inequality.html
5•cwwc•1h ago•1 comments