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.

The Summer of Open Weights

https://martinalderson.com/posts/the-summer-of-open-weights/
1•gmays•59s ago•0 comments

What is Nueralese and Why is it Bad

https://www.lesswrong.com/posts/RCYF2rW8wgusidZk7/what-is-neuralese-and-why-is-it-bad
1•tristanMatthias•2m ago•0 comments

An Alternative to Jira ScriptRunner

https://github.com/ONES-com/onescript-workflow-automation
1•BeautifulONES•2m ago•0 comments

The Last Interview

https://nition.momentstudio.co.nz/p/the-last-interview
1•Nition•5m ago•0 comments

NuFinder, a macOS file manager with real RAID across S3-compatible buckets

https://nufinder.org/
1•LouisvilleGeek•10m ago•0 comments

Kalder CEO Pleads Guilty to Securities Fraud

https://www.justice.gov/usao-sdny/pr/kalder-ceo-pleads-guilty-securities-fraud
1•mgh2•11m ago•0 comments

BoardUI

https://github.com/BoardUI/boardui
1•handfuloflight•18m ago•0 comments

Ask HN: How do you break AI agents out of the "apologize and repeat" loop

1•Marvin_RunAI•19m ago•0 comments

Remember Bebo? Founder shares the story

https://www.youtube.com/watch?v=H3QXvlY-kYM
1•kirstyaden•19m ago•0 comments

ArtStation Should Put Artists First

https://magazine.artstation.com/2026/09/ai-updates-from-artstation/
1•doppp•23m ago•0 comments

Crew – A multiplayer AI workspace for humans and agents, now with iOS apps

https://github.com/JamelHammoud/crew
1•alihammoud21•25m ago•0 comments

Wikimedia Workers Overwhelmingly Win Union with 93% Yes Vote

https://www.wired.com/story/wikipedia-workers-vote-on-whether-to-unionize/
2•taftfartley•26m ago•0 comments

GPT‑6 Astra

https://simonwillison.net/2026/Sep/3/gpt6-astra/
1•doppp•27m ago•0 comments

MemWeaver – a vector DB with predictable memory usage

https://github.com/daib/mem_weaver
1•legosys•27m ago•0 comments

Shell.Online: live browser link for any terminal process

https://shell.online/
1•handfuloflight•27m ago•0 comments

The Latest YC Batch

https://www.neweconomies.co/p/y-combinator-summer-26-batch
1•ollieforsyth•28m ago•0 comments

The Analyst – Practice Data Science Inside a Synthetic 16M-Row Company

https://theanalyst.dev
1•Stuart_Jones•29m ago•0 comments

Superlocal: Email Multiplexer

https://github.com/R44VC0RP/superlocal
1•handfuloflight•33m ago•0 comments

Congress Is Trying (Again) to Ban Boycotting Israel

https://reason.com/2026/09/03/congress-is-trying-again-to-ban-boycotting-israel/
10•slowin•33m ago•0 comments

Xbox Game Pass now limits the amount of hours each month

3•nodesocket•35m ago•2 comments

1Password Replied to My Disappointment

https://nicolalosito.it/2026/09/03/1password-replied-to-my-disappointment/
3•backlit4034•35m ago•0 comments

The Heavy Reality of Having a "Favorite Person" When You Live with BPD

https://medium.com/freedomofthought/the-heavy-reality-of-having-a-favorite-person-when-you-live-w...
1•raynchad•36m ago•0 comments

Paul Graham on Startups, Ambition, and Great Founders [video]

https://www.youtube.com/watch?v=5bxp78i96S8
2•jonbaer•37m ago•0 comments

Afterword – every word has a next word

https://afterword.exe.xyz
1•indigodaddy•38m ago•0 comments

Overview of Code Virtualization

https://tmpout.sh/5/12.html
1•vismit2000•45m ago•0 comments

Elon Musk Unmasked in Alex Gibney Documentary

https://www.hollywoodreporter.com/movies/movie-features/elon-musk-alex-gibney-documentary-1236686...
15•archagon•51m ago•0 comments

Therapeutic Food (Child Malnutrition)

https://en.wikipedia.org/wiki/Therapeutic_food
1•RetroTechie•53m ago•0 comments

Interactive Tree of Life

https://ptree.org/
6•Lucent•56m ago•2 comments

The Most Famous "Odyssey" Translation Is Inaccurate

https://substack.magazinenongrata.com/p/the-most-popular-odyssey-translation
2•georgex7•59m ago•1 comments

Green Card wait for most Indian immigrants is now 179 years

https://nypost.com/2026/09/03/us-news/green-card-wait-for-most-indian-immigrants-is-now-179-years...
5•pseudolus•59m ago•0 comments