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•10mo ago

Comments

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

Show HN: CRTX – AI code gen that tests and fixes its own output (OSS)

https://github.com/CRTXAI/CRTX
1•johnnycash926•1m ago•0 comments

US 500 Excluding Artificial Intelligence Enablers Price Return Index

https://www.google.com/finance/quote/SPXXAI:INDEXCME
3•mattas•6m ago•0 comments

Show HN: Check iOS Cert Status via our easy to use API

https://novadev.vip/api/
2•SuperGamer474•8m ago•0 comments

A war foretold:how the CIA and MI6 got hold of Putin's Ukraine plans and why

https://www.theguardian.com/world/ng-interactive/2026/feb/20/a-war-foretold-cia-mi6-putin-ukraine...
2•geoka9•10m ago•0 comments

The coding agent is dead

https://ampcode.com/news/the-coding-agent-is-dead
2•ElasticBottle•12m ago•0 comments

Klarna's shift to AI agents threatens traditional SaaS valuations

https://roundly.io/blog/klarna-ai-agents-replacing-saas
2•roundly_io•15m ago•1 comments

Show HN: YAML-schema-router – content-based schema routing for yaml ls

https://github.com/traiproject/yaml-schema-router
2•drLuca•21m ago•1 comments

Show HN: TypstMe – Build ATS-proof resumes using Typst and WASM

2•yoangilliand•22m ago•0 comments

Ask HN: Can RAG be used for recommendation system?

2•pinner•26m ago•0 comments

Ask HN: What happens to all the hardware when data centers upgrade?

3•givemeethekeys•26m ago•0 comments

CSLib: A Focused Effort on Formalizing Computer Science in Lean

https://www.cslib.io/
2•md224•28m ago•0 comments

Steve Webber on Multics

https://www.youtube.com/watch?v=0gzjrF9r6QA
2•twoodfin•28m ago•0 comments

Unlocking full-body human motor learning at scale

https://amathislab.github.io/mm-blog/
2•moatmoat•28m ago•0 comments

A Bollywood Spy Thriller Crosses the India-Pakistan Divide

https://www.bloomberg.com/news/articles/2026-02-20/bollywood-epic-dhurandhar-breaks-records-in-in...
2•petethomas•29m ago•0 comments

Show HN: Velo – Open-source, keyboard-first email client in Tauri and Rust

3•Espired•37m ago•0 comments

If Chatbots Can Replace Writers, It's Because We Made Writing Replaceable

https://thewalrus.ca/if-chatbots-can-replace-writers-its-because-we-made-writing-replaceable/
4•eon01•37m ago•0 comments

What Is OAuth?

https://leaflet.pub/p/did:plc:3vdrgzr2zybocs45yfhcr6ur/3mfd2oxx5v22b
9•cratermoon•38m ago•0 comments

Napkin Math

https://github.com/sirupsen/napkin-math
3•fagnerbrack•38m ago•0 comments

The Rise and Fall of Scala: A Love Letter to the Language That Broke My Heart

https://medium.com/@naveensky/the-language-that-made-me-feel-like-a-genius-until-it-didnt-my-brea...
3•b-man•41m ago•0 comments

Cord: Coordinating Trees of AI Agents

https://www.june.kim/cord
13•gfortaine•44m ago•0 comments

Heaven Has a Physical Location, a Physicist Claims

https://www.popularmechanics.com/science/a70423234/location-of-heaven/
3•nikolay•45m ago•3 comments

Facebook Is Doing A-Okay

5•givemeethekeys•46m ago•2 comments

Show HN: Share Your Ideas with the Community

https://novadev.vip/share/
2•SuperGamer474•47m ago•0 comments

Precise exceptions in relaxed architectures [video]

https://www.youtube.com/watch?v=JkNgZz4bu1E
2•matt_d•53m ago•1 comments

An Archaeological Dig Through the Extropian Archives

https://mtabarrok.com/extropia-archaeology
2•jdkee•53m ago•0 comments

India's Sarvam 105B LLM tops OCR benchmarks

https://timesofindia.indiatimes.com/technology/tech-news/explained-what-is-indias-sarvam-ai-model...
2•dyauspitr•54m ago•0 comments

Show HN: I created a beautiful number animation library for React Native

https://number-flow-react-native.awingender.com/
2•WingenderA•55m ago•0 comments

Correcting the Financial Times Report about AWS, Kiro, and AI

https://www.aboutamazon.com/news/aws/aws-service-outage-ai-bot-kiro
2•nonfamous•56m ago•0 comments

Show HN: I built a 55K-word email marketing knowledge base and Claude Code skill

https://www.emailmarketingskill.com/
3•cosmoblk•1h ago•0 comments

Little PAIPer – Learn computer science through Peter Norvig's teachings

https://lilpaiper.ai
2•vismit2000•1h ago•0 comments