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.

Mistral wanted to beat Anthropic. Now it's becoming Palantir

https://sifted.eu/articles/mistral-palantir-data
1•mxgep•54s ago•0 comments

The PImpl idiom and the C++26 std:indirect type

https://mariusbancila.ro/blog/2026/07/23/the-pimpl-idiom-and-the-cpp26-stdindirect-type/
1•jandeboevrie•2m ago•0 comments

What's New in Postgres 19

https://planetscale.com/blog/whats-new-in-postgres-19
1•Erenay09•2m ago•0 comments

A Deep Logo Study

https://dannyspina.com/blog/my_new_logo_study
1•nate•2m ago•0 comments

LOS Minesweeper: A Minesweeper App for the Lisa Office System

https://github.com/alexthecat123/los_minesweeper
1•hggh•3m ago•0 comments

Stop Using Media Bias/Fact Check in Research

https://arxiv.org/abs/2607.12108
1•hn_acker•4m ago•0 comments

US eyes ban on Chinese humanoid robots as US-China tech rivalry intensifies

https://www.scmp.com/tech/policy/article/3361622/us-eyes-ban-chinese-humanoid-robots-us-china-tec...
1•theanonymousone•6m ago•0 comments

After shocking quarter, IBM insists that AI isn't killing the mainframe

https://techcrunch.com/2026/07/22/after-shocking-quarter-ibm-insists-that-ai-isnt-killing-the-mai...
2•Brajeshwar•6m ago•0 comments

Show HN: Cloud for your AI Agent's tools/fuctions

https://github.com/abskrj/velane
1•abhishekraj272•6m ago•0 comments

Framework memory costs have doubled

https://frame.work/blog/updates-on-memory-pricing-and-navigating-the-volatile-memory-market
1•everfrustrated•7m ago•0 comments

Microsoft Is Replacing OpenAI Image Models in PowerPoint, Bing

https://www.bloomberg.com/news/articles/2026-07-23/microsoft-replacing-openai-image-ai-models-in-...
1•larrysalibra•7m ago•0 comments

What just happened to TheNumbers.com should worry us all

https://stephenfollows.com/p/what-just-happened-to-thenumberscom-should-worry-us-all
2•nickthegreek•8m ago•0 comments

Cockroach Democracy: Unarmed and Dangerous

https://thewire.in/rights/cockroach-democracy-unarmed-and-dangerous
1•wavelander•9m ago•0 comments

Naive design is better than AI design

https://alexwennerberg.com/blog/2026-07-13-naive.html
1•speckx•11m ago•0 comments

The Arguments Against Open Source AI Are Very Bad

https://tombedor.dev/arguments-against-open-source-ai-are-very-bad/
1•jjfoooo4•11m ago•0 comments

Launch HN: Screenpipe (YC S26) – Power your agents by your 24/7 screen recording

6•louis030195•13m ago•1 comments

Social-Media Age Bans Won't Make Children Safer – Pressuring Tech Firms Will

https://www.project-syndicate.org/commentary/eu-social-media-regulation-must-focus-on-design-not-...
1•theanonymousone•13m ago•0 comments

The Future of Software Engineering [pdf]

https://www.thoughtworks.com/content/dam/thoughtworks/documents/report/tw_future_of_software_engi...
1•steve-chavez•15m ago•0 comments

Report from the March to Stop the AI Race

https://www.robinsloan.com/lab/stop-ai-march/
1•speckx•16m ago•0 comments

ChatGPT Led to a Man's Near-Fatal Health Crisis, Lawsuit Claims

https://www.nytimes.com/2026/07/22/well/openai-chatgpt-health-lawsuit.html
2•randycupertino•16m ago•0 comments

What Nonprofit CEOs Earn

https://data.charitysense.com/blog/what-nonprofit-ceos-earn
1•mtweak•17m ago•1 comments

At 91, He's Hiking the Appalachian Trail. Again

https://www.nytimes.com/2026/07/14/well/appalachian-trail-hiking-record-grey-beard.html
1•gmays•18m ago•0 comments

Why the UK is dithering over what to do about e-scooters

https://www.bbc.com/news/articles/cn4nvn9w00no
2•davnicwil•19m ago•0 comments

Efficient social learning is the human advantage over AI by Devid Deming

https://forklightning.substack.com/p/efficient-social-learning-is-the
1•sendes•19m ago•0 comments

I Reported on Flock's Cameras. Now I'm One of the System's Mistakes

https://www.thedrive.com/news/i-reported-on-flocks-cameras-now-im-one-of-the-systems-mistakes
4•CharlesW•20m ago•0 comments

Hill-Climbing MAI Models for GitHub Copilot and Excel

https://microsoft.ai/news/hill-climbing-mai-models-for-github-copilot-and-excel/
2•ChrisArchitect•22m ago•0 comments

How to Talk to Your Robot: Keeping Coding Agents on Track

https://johnjeffers.com/how-to-talk-to-your-robot/
1•freediver•24m ago•0 comments

US Government targets Cop City protester over phone operating system

https://www.theguardian.com/us-news/2026/jul/23/cop-city-protester-phone
5•pastemato•24m ago•1 comments

Microsoft launches hill-climbing MAI models for Copilot and Excel

https://runtimewire.com/article/microsoft-hill-climbing-mai-models-copilot-excel
1•ryanmerket•25m ago•2 comments

Tesla's Founders Are Backing the Anti-Cybertruck

https://www.forbes.com/sites/alanohnsman/2026/07/23/teslas-founders-are-backing-the-anti-cybertruck/
2•rawgabbit•25m ago•0 comments