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.

Smashed Toilet Phone Web Server

https://www.offthebricks.com/articles/smashed-toilet-phone-web-server
1•mircerlancerous•50s ago•0 comments

DBOS Network Sensing: A Web Services Approach to Collaborative Awareness

https://arxiv.org/abs/2509.09898
1•teleforce•2m ago•0 comments

Decouple the Agent: Why Prompts, Tools, and Models Don't Belong in Your Client

https://vivgrid.com/decoupling-prompts-tools-models-from-agent-client
1•fanweixiao•2m ago•0 comments

AI Has Amnesia. Here's Every System Built to Fix It

https://medium.com/@alanayalag/your-ai-has-amnesia-heres-every-system-built-to-fix-it-ad7dee117a75
1•AlanAAG•4m ago•0 comments

Ask HN: How do you design CLIs for agents?

1•vokneruk•9m ago•0 comments

Lsp85 – an lsp for the Intel 8085 assembly

1•irhs•9m ago•0 comments

Show HN: Go-To-Market for Engineers article series

https://supramono.com/blog/go-to-market-for-engineers-distribution-is-the-product/
2•supramono•17m ago•0 comments

Netlify Drop

https://app.netlify.com/drop
1•skogstokig•17m ago•0 comments

Tech's Next IPO Wave Promises a Charitable Windfall

https://www.wsj.com/finance/investing/techs-next-ipo-wave-promises-a-charitable-windfall-885a1e74
2•builtbystef•28m ago•0 comments

iOS 27's Reworked Stub Islands

https://codecolor.ist/posts/2026-06-15-ios27-reworked-stub-islands/
2•gok•30m ago•0 comments

Argentina Wants to Let AI Own Companies. Here's What That Means

https://www.forbes.com/sites/anishasircar/2026/06/10/ai-owned-companies-argentina/
1•pseudolus•30m ago•0 comments

CoCoMS (Construction Correspondence Management System)

1•cmina•32m ago•0 comments

Sync – Quality Control and Project Management System for AI Agents

https://sync.buzz
1•nikolai_evseev•34m ago•0 comments

Polis – the #1 tool for AI agent coordination

https://polis-protocol.vercel.app/#
1•lucius_gc•36m ago•0 comments

Why You Need to Become a Neuro-Punk Right Now

https://medium.com/@artem-x/why-you-need-to-become-a-neuro-punk-right-now-f266223ac440
1•theorchid•41m ago•0 comments

US and Iran reach cease fire agreement

https://www.nytimes.com/live/2026/06/14/world/iran-war-trump-us
3•koolba•46m ago•0 comments

Molecular Diversity as a Biosignature

https://www.nature.com/articles/s41550-026-02864-z
2•wslh•54m ago•0 comments

Kevin Warsh Wants the Fed to Stop Explaining Everything

https://www.wsj.com/economy/central-banking/fed-warsh-chair-communication-d2f2d226
3•Cider9986•55m ago•1 comments

BEAVER: Enterprise benchmark for LLM Text-to-SQL from private data warehouses

https://beaverbench.github.io/
2•teleforce•59m ago•0 comments

Show HN: Astro Sidey – A simple, minimalistic personal blog theme

https://github.com/odhyp/astro-sidey
2•odhy•1h ago•0 comments

Your Database Is the Bottleneck. Not Your Code

https://howtocenterdiv.com/beyond-the-div/your-database-is-the-bottleneck-not-your-code
2•mooreds•1h ago•0 comments

On, Good Advice Delivered Poorly

https://makc.co/essays/good-advice-delivered-poorly/
2•makc•1h ago•0 comments

Under the River

https://shopify.engineering/under-the-river
2•mooreds•1h ago•0 comments

The More Confident in AI Security, the More Likely Breached, Study Finds

https://www.itsecurityguru.org/2026/06/11/the-more-confident-organizations-are-in-their-ai-securi...
4•mooreds•1h ago•0 comments

The hallucinogenic mushroom that contains no known psychedelic

https://psychedelics.co.uk/news/a-mushroom-genus-that-gets-people-high-but-not-the
25•thunderbong•1h ago•9 comments

Learn to Think in Systems, It'll Put You Ahead of 99% of People [video]

https://www.youtube.com/watch?v=mjTgkm-h__M
3•ohjeez•1h ago•0 comments

Plots, love letters and remedies: The medieval secrets being revealed by AI

https://www.bbc.com/future/article/20260527-plots-love-letters-and-diplomacy-the-medieval-secrets...
3•leecoursey•1h ago•0 comments

git-stk: Git-native stacked branch workflow helper

https://github.com/lararosekelley/git-stk
3•sayonara_lara•1h ago•4 comments

The rich aren't your role models

https://theslowburningfuse.wordpress.com/2026/06/14/the-rich-arent-your-role-models-theyre-your-o...
113•Refreeze5224•1h ago•44 comments

An Introduction to Old Javanese [pdf]

https://www.aa.tufs.ac.jp/wp-content/uploads/2024/02/2015oldjavanese1.pdf
2•teleforce•1h ago•0 comments