frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Avoid Continue

https://www.teamten.com/lawrence/programming/avoid-continue.html
2•todsacerdoti•7mo ago

Comments

zoezoezoezoe•7mo 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•7mo 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.

OpenAI Declares 'Code Red' as Google Threatens AI Lead

https://www.wsj.com/tech/ai/openais-altman-declares-code-red-to-improve-chatgpt-as-google-threate...
1•calstad•1m ago•0 comments

NYC's Premiere Analog Photobooth Gallery and Museum

https://www.autophoto.org/museum
1•mooreds•1m ago•0 comments

Project Iceberg – Coordinating the Human-AI Future

https://iceberg.mit.edu/
1•gmays•1m ago•0 comments

Why Healthcare Is in a Death Spiral: Follow the Money

http://charleshughsmith.blogspot.com/2025/12/why-healthcare-is-in-death-spiral.html
1•speckx•1m ago•0 comments

China's 'dirt cheap' hypersonic missiles could upend global defence markets

https://www.scmp.com/news/china/science/article/3334933/chinas-dirt-cheap-hypersonic-missiles-cou...
1•etiam•2m ago•0 comments

What I'm doing in GTM as B2B SaaS founder as of Dec 25

https://nonamevc.substack.com/p/what-im-doing-in-gtm-as-b2b-saas
1•zkid18•5m ago•0 comments

Show HN: Jester News - An RSS/Atom Companion App

https://jesterengine.com/pages/app
2•dan_h•5m ago•0 comments

What is evented IO and why does it scale?

http://ksat.me/what-is-evented-io-and-why-it-scales
1•andsoitis•6m ago•0 comments

Show HN: RunMat – runtime with auto CPU/GPU routing for dense math

https://github.com/runmat-org/runmat
2•nallana•6m ago•0 comments

Dionysiaca by Nonnus

https://topostext.org/work/529
1•keepamovin•9m ago•0 comments

'Function Coloring'

https://www.tedinski.com/2018/11/13/function-coloring.html
1•andsoitis•10m ago•0 comments

The myth of the $140k poverty line

https://marginalrevolution.com/marginalrevolution/2025/12/the-myth-of-the-140000-poverty-line.html
1•speckx•11m ago•0 comments

Show HN: Max MRR Calculator – Find Your Startup's Growth Ceiling

https://www.failory.com/tools/max-mrr
1•nocodebcn•12m ago•0 comments

Show HN: TinyTune – fine-tune open-source AI on your own data with no code

https://www.tinytune.xyz/
1•Jacques2Marais•12m ago•0 comments

Mistral 3 family of models released

https://mistral.ai/news/mistral-3
5•pember•12m ago•1 comments

Sunset Section 230 and Unleash the First Amendment

https://cacm.acm.org/opinion/sunset-section-230-and-unleash-the-first-amendment/
1•bikenaga•13m ago•0 comments

Gemini Great Grandmother

https://avc.xyz/gemini-great-grandmother
1•wslh•14m ago•0 comments

OpenAI declares 'code red' as Google catches up in AI race

https://www.theverge.com/news/836212/openai-code-red-chatgpt
2•goplayoutside•14m ago•0 comments

What MCP and Claude Skills Teach Us About Open Source for AI

https://www.oreilly.com/radar/what-mcp-and-claude-skills-teach-us-about-open-source-for-ai/
1•odewahn•14m ago•0 comments

Show HN: Marmot – Single-binary data catalog (no Kafka, no Elasticsearch)

https://github.com/marmotdata/marmot
3•charlie-haley•15m ago•1 comments

Michael and Susan Dell to Put $250 in 25M Children's Accounts

https://www.nytimes.com/2025/12/02/business/dell-children-trump-accounts.html
3•thelastgallon•16m ago•1 comments

Can you make stingray without full duplex SDR?

1•khiqinsta•16m ago•0 comments

Daily JavaScript and Python Coding Challenges in the Browser – AdventJS 2025

https://adventjs.dev/en
2•wildkyo•16m ago•0 comments

AI Is Destroying the University and Learning Itself

https://www.currentaffairs.org/news/ai-is-destroying-the-university-and-learning-itself
5•speckx•17m ago•0 comments

Zig's new approach to asynchronous I/O

https://zig.show/episodes/41/
1•andsoitis•18m ago•0 comments

Ask HN: Have You Automated Cooking?

1•yesitcan•18m ago•1 comments

MCP vs. ChatGPT Apps: A Detailed Comparison

https://alpic.ai/blog/mcp-apps-how-it-works-and-how-it-compares-to-chatgpt-apps
1•harijoe•19m ago•1 comments

Show HN: SafePool – Type-safe object pooling for Go

https://github.com/oodle-ai/safepool
3•mvijaykarthik•19m ago•1 comments

Nixtml: Static website and blog generator written in Nix

https://github.com/arnarg/nixtml
2•todsacerdoti•19m ago•0 comments

Show HN: Turning Wikipedia's blocklists into a proxy detection database

https://github.com/NetworkCats/OpenProxyDB
1•networkcat•20m ago•0 comments