frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Gleam v1.17.0 Released

https://gleam.run/news/single-file-gleam-beam-programs-with-escript/
1•figbert•2m ago•0 comments

Copper imbalance tied to autism's social symptoms and white matter development

https://medicalxpress.com/news/2026-06-copper-imbalance-autism-social-symptoms.html
1•OutOfHere•4m ago•1 comments

Firefox AI Coding Policy

https://firefox-source-docs.mozilla.org/contributing/ai-coding.html#firefox-ai-coding-policy
1•Topfi•5m ago•0 comments

The Last Whole Earth Catalog, Catalog (2026)

https://wholeearth.cjohnson.io
2•natural219•5m ago•0 comments

A 5-minute OTA update and rollback flow for Expo and Capacitor apps

https://otalan.com/docs/quick-start/quick-start/
1•cirtadev•7m ago•0 comments

The next gold rush: How the Bay Area can keep its edge in the AI era

https://www.mckinsey.com/industries/social-sector/our-insights/the-next-gold-rush-how-the-bay-are...
1•littlexsparkee•7m ago•0 comments

I got tired of proprietary supplement blends, so I open-sourced my formulas

https://nuc.luyml.com
2•david_clk•10m ago•0 comments

Yahoo reduces email storage limits for free and paid accounts

https://help.yahoo.com/kb/SLN37064.html
1•asdefghyk•13m ago•1 comments

Show HN: Name2Tree – Turn any name into a deterministic tree

https://tree.bairui.dev/
2•subairui•16m ago•1 comments

Pass the Cherries: Review of Twilight of the Dons

https://literaryreview.co.uk/pass-the-cherries
1•Petiver•16m ago•0 comments

Company Manufactures Stamped-Steel Classic Replica Bodies for Mustang, FJ40

https://www.youtube.com/watch?v=cBBZrjwqWZc
1•benfrancom•17m ago•1 comments

The Next Era of Knowledge Work [pdf]

https://cdn.openai.com/pdf/the-next-era-of-knowledge-work.pdf
1•iooi•17m ago•0 comments

AI Coding Tips for 2026

https://raheelyawar.medium.com/ai-coding-tips-may-2026-43a12e68067a
1•dbgrman•18m ago•1 comments

Create Godot Games on Android

https://godotengine.org/article/gabe-stable-release/
1•LorenDB•20m ago•0 comments

Real-time map of when the world is horny

https://masturbate.now/pulse
1•untitled-now•21m ago•1 comments

Against the Survival of the Prettiest (2022)

https://worksinprogress.co/issue/against-the-survival-of-the-prettiest/
2•tmp10423288442•22m ago•0 comments

Android Security Bulletin June 2026

https://source.android.com/docs/security/bulletin/2026/2026-06-01
1•panarky•22m ago•1 comments

Feather Game Engine

https://github.com/mariojgt/featherEngine
1•mariojgt•22m ago•0 comments

Microsoft says new quantum chip 1k times more reliable than predecessor

https://www.bbc.com/news/articles/cj4p7gyvp52o
1•neversaydie•25m ago•0 comments

ReachIQ – paste a LinkedIn URL, get a personalised cold email draft in 10s

https://reachiq.co
1•cjroc•28m ago•0 comments

End of Civilization News

https://www.math.columbia.edu/~woit/wordpress/?p=15705
2•jjgreen•30m ago•1 comments

Show HN: Dynamically Generated Fluid UI's

https://balladic.com/demo/narrative
1•bhark•33m ago•0 comments

Hiring Thread for AML/KYC/Trust and Safety Roles – June 2026

2•MichaelZuZu•36m ago•1 comments

Introduction to Paigham (Message) Nats UI

https://github.com/LetsConvert-IO/paigham-nats
2•urashidmalik•37m ago•0 comments

Cliffwater's flagship private credit fund hit with 17% redemption requests

https://www.ft.com/content/dfdfee64-d3fb-487a-9019-1926387b0ef1
2•JumpCrisscross•38m ago•0 comments

Advertisements as Articles in the Register MS

https://techrights.org/n/2026/06/02/Advertisements_as_Articles_in_The_Register_MS.shtml
2•amcclure•40m ago•0 comments

Coinbase Founder's Longevity Startup Triples in Value

https://www.wsj.com/business/newlimit-startup-brian-armstrong-value-82ab9830
2•wslh•41m ago•0 comments

Majorana 2 [video]

https://www.youtube.com/watch?v=1bN4O5_meB4
2•ketchup32613•42m ago•0 comments

Flag Mates, A two-player flag guessing game I built as a wedding gift

https://flagmates4.life/
2•risquer•43m ago•1 comments

Apple's MacBook Neo is winning over a new generation of buyers

https://techcrunch.com/2026/06/02/apples-macbook-neo-is-winning-over-a-new-generation-of-buyers/
4•dhfbshfbu4u3•44m ago•0 comments