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.

Ask HN: What's your favorite AI tool for front end design?

1•AlanAAG•33s ago•0 comments

Anchored – evidence gates for autonomous AI coding agents

https://github.com/chafoo/anchored
1•chafoo•1m ago•0 comments

Silicon Valley has much to learn from the spreadsheet jockeys it despises

https://economist.com/business/2026/06/24/silicon-valley-has-much-to-learn-from-the-spreadsheet-j...
1•wiseowise•2m ago•0 comments

Formula for how cold outreach works

1•shoman3003•3m ago•0 comments

The Monastery of Nahal – An AI Cyberchurch

https://nahal.church/
1•ChilledTonic•3m ago•0 comments

Pkgit – unconventional package manager to compile/install packages from Git

https://git.symlinx.net/pkgit/about/
1•modinfo•6m ago•1 comments

Carolina Cloud now pays interest on prepaid credit balances

https://docs.carolinacloud.io/organizations/prepaid-interest/
1•bojangleslover•6m ago•0 comments

Beautiful visually organized bookmark manager Chrome extension

https://chromewebstore.google.com/detail/bookmarkr-—-visual-bookma/lianafemkbankodapdaokiefoffi...
1•mnomansd•7m ago•0 comments

Hrs Humanoids In-the-Wild Dataset

https://bitrobot-foundation.github.io/humanoids-in-the-wild-500-hours/
1•Tycho87•11m ago•0 comments

Show HN: MAVS-GC – An Open-Source Governance Architecture for AI Systems

https://docs.google.com/document/d/1h7qpDgLv2PyIB6ZlLED5qGDeUbnNbITzNEspmsxA7ZE/edit?usp=sharing
1•infernusreal•13m ago•0 comments

Best of AI is now open source

https://bestofai.io/journal/best-of-ai-is-now-open-source/
3•dariubs•14m ago•0 comments

The future of large files in Git is Git

https://gopeekapp.blogspot.com/2026/06/the-future-of-large-files-in-git-is-git.html
1•guptalog•15m ago•0 comments

Free-threaded Python: past, present, and future

https://lwn.net/Articles/1078367/
1•prakashqwerty•21m ago•1 comments

The US Army Issued Ocarinas to Soldiers in World War II

https://www.flutetunes.com/articles/my-flute-goes-to-war/
2•tomcam•22m ago•0 comments

Domino Tiling: From Dynamic Programming to Finite Fields

https://www.omegasyntax.com/domino/
1•vbrhjajcn•26m ago•0 comments

632nm Podcast: John Bowers – Silicon Photonics and the Future of AI Scaling [video]

https://www.youtube.com/watch?v=fjQ3Yorw-Ps
1•wwarner•29m ago•0 comments

Kids Act Would Require Age Checks to Get Online

https://www.eff.org/deeplinks/2026/06/kids-act-would-require-age-checks-get-online
2•mdp2021•32m ago•1 comments

Bluetooth T9 keyboard for smartphones (and other things)

https://jrainimo.com/build/2026/05/t9/
2•rcarmo•32m ago•0 comments

Chasing Fable – An illustrated engineering tale

https://adapt.com/blog/chasing-fable
1•ashumz•38m ago•0 comments

Every match of the 2026 World Cup as a generative poster

https://matchprint.info/
3•coinfused•40m ago•1 comments

Conductor Cloud

https://www.conductor.build/docs/cloud-beta
1•sklinkert•41m ago•0 comments

One-two punch delivered in global operation disrupts cybercrime "assembly line"

https://arstechnica.com/security/2026/06/one-two-punch-delivered-in-global-operation-disrupts-cyb...
2•joozio•42m ago•0 comments

LLM Refusal Behavior on Open-Weight Model

https://zentara.co/blog/llm-refusal-behavior/
1•tvalentius•43m ago•0 comments

Wikipedia Workers in Britain set global first by seeking union recognition

https://utaw.tech/news/wikipedia-recognition
8•chobeat•45m ago•2 comments

Ask HN: Optimal Journaling Book Choice?

1•herodoturtle•50m ago•0 comments

DRAM Price Fixing Scandal

https://en.wikipedia.org/wiki/DRAM_price_fixing_scandal
5•kamranjon•58m ago•0 comments

With crossplanes, Helm is all you need

https://medium.com/zencity-engineering/now-the-infrastructure-is-boring-too-and-thats-still-a-com...
2•alonisser•59m ago•1 comments

Cogent France: « perform an orderly shutdown of your equipment »

https://www.mail-archive.com/frnog@frnog.org/msg80526.html
1•southerntofu•1h ago•0 comments

Did AI write this article?

https://www.economist.com/graphic-detail/2026/06/16/did-ai-write-this-article
3•ijidak•1h ago•0 comments

Is AI Coming for Our Jobs?

https://jacobin.com/2026/02/ai-technology-productivity-growth-job-loss
3•one33seven•1h ago•0 comments