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.

Terry Tao Became an Evangelist for AI in Math

https://www.quantamagazine.org/how-terry-tao-became-an-evangelist-for-ai-in-math-20260608/
1•Tomte•2m ago•0 comments

China's Hukou System Is Stubbornly Resistant to Reform

https://jacobin.com/2026/06/china-hukou-mobility-services-inequality
1•PaulHoule•2m ago•0 comments

A 35B MoE on a 16 GB GPU, without the offload tax

https://www.lucebox.com/blog/spark
1•GreenGames•2m ago•0 comments

Text to Song Trend

https://musically.com/2026/06/01/suno-is-riding-the-wave-of-tiktoks-new-text-to-song-trend/
1•hmokiguess•2m ago•0 comments

Copy, paste, govern: Microsoft ghostwrote EU policy

https://algorithmwatch.org/en/copy-paste-govern-microsoft-ghostwrote-eu-policy/
1•jruohonen•2m ago•0 comments

MiMo-v2.5-Pro-UltraSpeed: 1T model with 1000 TPS

https://mimo.xiaomi.com/blog/mimo-tilert-1000tps
1•gainsurier•4m ago•0 comments

Bending Spoons Files for US IPO

https://sifted.eu/articles/bending-spoons-files-for-us-ipo
1•speter•5m ago•0 comments

I replaced Spotify with a homemade FM radio station

https://old.reddit.com/r/digitalminimalism/comments/1tes8yu/i_replaced_spotify_with_a_homemade_fm...
3•dredmorbius•6m ago•0 comments

Pharo – New VM Release

https://pharo.org/news/2026-06-02-NewVM.html
1•Tomte•7m ago•0 comments

Woolyss Chromium website shutting down 2026-08-31

https://chromium.woolyss.com/
1•brycewray•10m ago•0 comments

Building a Korean ambiguity solver fast enough to skip the GPU: 7,300 words/SEC

https://kimchi-reader.app/blog/int8-cpu-korean-disambiguation
1•alaanor•11m ago•0 comments

AI and the invisible newcomer in open source

https://blog.stdlib.io/ai-and-the-invisible-newcomer-in-open-source/
2•kgryte•11m ago•0 comments

World Capitals Voronoi

https://www.jasondavies.com/maps/voronoi/capitals/
1•vincnetas•12m ago•1 comments

Amid a flood of AI advances astrophysicists are questioning soul of their field

https://www.science.org/content/article/amid-flood-ai-advances-astrophysicists-are-questioning-so...
1•bookofjoe•12m ago•0 comments

Ideogram 4.0

https://ideogram.ai/models/4.0/
2•pentagrama•12m ago•0 comments

Amazon Cognito now supports multi-Region replication

https://aws.amazon.com/about-aws/whats-new/2026/06/amazon-cognito-multi-region/
3•mooreds•12m ago•1 comments

Life – an artificial life simulation with Φ* integrated information

https://github.com/cosmosoneness/Cosmos-Research-Institute/tree/main/Emulation/Life
1•cosmosoneness•12m ago•0 comments

Show HN: OceanEye – an open-source interactive 3D atlas of ocean life

https://oceaneye.woodydesign.io/en/
1•woodydesign•13m ago•0 comments

Show HN: Xa11y – cross-platform desktop automation via accessibility trees

https://xa11y.dev/
1•_crowecawcaw•14m ago•0 comments

France took the nuclear option to make Putin think twice

https://www.telegraph.co.uk/world-news/2026/05/26/how-europe-learnt-to-love-the-bomb/
1•speckx•15m ago•0 comments

Meta AI Instagram Hack Wasn't About Authentication. It Was About Authorization

https://www.cybersecurity-insiders.com/the-meta-ai-instagram-hack-wasnt-about-authentication-it-w...
1•mooreds•15m ago•0 comments

Applied Reverse Engineering Course

https://revers.engineering/applied-reverse-engineering-series/
1•Iuz•15m ago•0 comments

'The rich are living a golden age under Trump'

https://english.elpais.com/economy-and-business/2026-06-06/the-popularizer-of-the-k-shaped-econom...
3•mooreds•15m ago•0 comments

Introduction to nixidy – Kubernetes GitOps with Nix

https://codedbearder.com/posts/nixidy-part-1-introduction/
1•granra•16m ago•0 comments

Property-Based Testing

https://tybug.dev/property-testing/
1•tybug•16m ago•0 comments

A Farmer Donated Land to Turn into a Park. The City Is Building a Data Center

https://www.404media.co/a-farmer-donated-land-to-turn-into-a-park-the-city-is-building-a-massive-...
1•greedo•17m ago•0 comments

Reading of OpenAI's Self-Improving Tax Agents

https://olshansky.info/posts/2026-06-08-reading-of-openais-self-improving-tax-agents
2•Olshansky•18m ago•0 comments

xAI is looking more like a datacentre REIT than a frontier lab

https://martinalderson.com/posts/xais-new-rental-business/
1•martinald•18m ago•0 comments

Show HN: Levi – run AlphaEvolve on your Claude Code/Codex for dirt cheap

https://ttanv.github.io/levi/
4•ttanv•19m ago•0 comments

"a game of court intrigue where AI simulates the various courtiers"

https://substack.com/@alicemaz/note/c-265000587
2•pavel_lishin•20m ago•0 comments