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.

Resting your laptop on your lap for long periods could risk skin disfiguration

https://www.scimex.org/newsfeed/resting-your-laptop-on-your-lap-for-long-periods-could-risk-skin-...
1•dabinat•1m ago•0 comments

WeWorm

https://calif.io/research/weworm
1•simonw•3m ago•0 comments

1900 Blizzard Developers Just Won a Union Contract

https://kotaku.com/blizzard-workers-union-contract-microsoft-2000732422
1•gpi•4m ago•0 comments

Belegio – Parsing grocery receipts down to the line item

https://belegio.loobia.net/en
1•MehrdadEshghi•6m ago•0 comments

iPhone 18 Pro Introduces 'Apple Reference Image' to Verify Photo Authenticity

https://www.macrumors.com/2026/09/09/apple-reference-image/
1•pgwhalen•7m ago•0 comments

Time, Clocks, and the Ordering of Events in a Distributed System (1978) [pdf]

https://lamport.azurewebsites.net/pubs/time-clocks.pdf
1•danbitengo•15m ago•0 comments

Screenmap

https://screenmap.dev/
1•handfuloflight•15m ago•0 comments

Ask HN: Why can I only downvote select comments?

3•socalgal2•16m ago•3 comments

Show HN: PCalen – Generate free printable calendar in seconds

https://pcalen.com/
1•aleker•17m ago•0 comments

Lean Game Server

https://adam.math.hhu.de/#/
3•abetusk•20m ago•0 comments

Natural Number Game (Lean4 Tutorial)

https://adam.math.hhu.de/#/g/hhu-adam/NNG4
3•abetusk•20m ago•1 comments

National Archives locations set to close without tribal consultation

https://ictnews.org/news/these-records-are-priceless-3-national-archives-locations-set-to-close-w...
1•mooreds•20m ago•0 comments

Agent Router: Powerful traffic handling for agent builders

https://aaif.io/blog/agent-router-powerful-traffic-handling-for-agent-builders
1•mooreds•23m ago•0 comments

Playship – idea to published Android app, automated

https://playship.dev/
1•bowwerick•24m ago•0 comments

RyTuneX 1.7.1: open-source Windows 10/11 optimizer adds per-item rollback

https://github.com/rayenghanmi/RyTuneX
1•wangxin199•28m ago•0 comments

Apple Watch's new feature listens to your chats and recaps them

https://techcrunch.com/2026/09/09/apple-watchs-new-feature-listens-to-your-chats-and-recaps-them/
1•pier25•28m ago•0 comments

Review a pull request by booting it

https://fzakaria.com/2026/09/09/review-a-pull-request-by-booting-it
3•domenkozar•29m ago•0 comments

Show HN: Rayrun – one MCP gateway for the whole company

https://ray.run/
2•lucgagan•30m ago•0 comments

Microsoft Surface Duo

https://news.microsoft.com/surfaceduo/
2•fortran77•32m ago•1 comments

PEG: Postgres and Elm and Go

https://github.com/ramblingenzyme/peg/tree/main
1•ramblingenzyme•33m ago•0 comments

Navier–Stokes, AI and the future of research in mathematics [pdf]

https://bms.ulb.ac.be/data/uploads/untitled.pdf
2•fghorow•34m ago•2 comments

Anthropic discloses fourth AI hacking incident missed in earlier review

https://www.reuters.com/legal/litigation/anthropic-reports-fourth-cybersecurity-incident-with-ear...
3•accountinhn•35m ago•0 comments

Trezor's Email provider has been breached

https://twitter.com/CR1337/status/2097841222954184954
2•CR1337•37m ago•0 comments

Max Dama on Automated Trading (2011) [pdf]

http://isomorphisms.sdf.org/maxdama.pdf
1•TheAlchemist•40m ago•0 comments

Van Halen Test

https://en.wikipedia.org/wiki/Van_Halen_test
1•evo_9•43m ago•0 comments

Getting 50 GB/S Back from the Apple Neural Engine

https://eiln.github.io/posts/ane-dma.html
1•eiln•45m ago•1 comments

Tor VPN Beta: What we've learned building our own VPN for Android from scratch

https://blog.torproject.org/tor-vpn-beta/
2•woofcat•45m ago•0 comments

Where Stability Becomes the Constraint

https://medium.com/@gurvinder372/article-14-where-stability-becomes-the-constraint-c262b07f617c
1•gps372•48m ago•0 comments

Coinbase Design Systems Are Powering the AI Prototyping Era

https://www.coinbase.com/blog/how-coinbase-design-systems-are-powering-the-ai-prototyping-era
2•dukebartnik•48m ago•0 comments

Show HN: Kin – A code repository built for AI and the people working with it

https://github.com/firelock-ai/kin
1•troyjr4103•50m ago•0 comments