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.

Myrient will shut down on 31 March 2026. Download any content you find important

https://myrient.erista.me
1•chaifeng•55s ago•0 comments

Neural-Temporal Compression – A State-Persistence Framework

https://github.com/andresuarus10-byte/memory-engine
1•KaelyrAT13•3m ago•1 comments

Show HN: A Calculator for Garden Horizons

https://gardenhorizons.app/
1•hugh1st•3m ago•0 comments

Doing a Video Call over a Database

https://www.youtube.com/watch?v=zwIc9fFcYVw
1•Jacques2Marais•6m ago•0 comments

Superagers' Secret Ingredient May Be the Growth of New Brain Cells

https://www.sciencealert.com/superagers-secret-ingredient-may-be-the-growth-of-new-brain-cells
1•jnord•7m ago•0 comments

Fooling Go's X.509 Certificate Verification

https://danielmangum.com/posts/fooling-go-x509-certificate-verification/
1•hasheddan•9m ago•0 comments

'To be free, we have to be feared,' Macron says in keynote nuclear speech

https://www.france24.com/en/france/20260302-macron-unveils-france-nuclear-strategy-eu-counter-rus...
1•vrganj•9m ago•0 comments

I built a pint-sized Macintosh

https://www.jeffgeerling.com/blog/2026/pint-sized-macintosh-pico-micro-mac/
2•ingve•15m ago•0 comments

Ask HN: How to get traction for Open-Source Projects

1•human_hack3r•16m ago•0 comments

Show HN: Proofbox – Defensive Publishing Platform to preserve freedom to operate

https://www.proofbox.co/en
2•gartheuncle•17m ago•0 comments

Building AI agent for our own company

https://blog.leanmcp.com/blog/llms-getting-leanmcp-wrong
1•dheerajmp•18m ago•0 comments

Show HN: I built a social media distribution tool that helps you find users

https://signal-grow.vercel.app
1•dog52841•20m ago•1 comments

Performance Analysis and Tuning on Modern CPUs 2nd edition [pdf]

https://github.com/dendibakh/perf-book/releases/download/2.0_release/PerformanceAnalysisAndTuning...
3•medbar•21m ago•0 comments

Show HN: Neural Siege – A Multi-Agent RL Combat Simulation

https://github.com/ayushdnb/Neural-Siege
2•luthor190397•24m ago•0 comments

4. How to Keep Using Nano Banana Pro After Gemini Replaces It with Nano Banana 2

2•zaaaaooo•25m ago•0 comments

Show HN: C-Suite Skills – a full exec team as skills

https://github.com/pollow/c-suite-skills
2•pollow•31m ago•0 comments

Veo 3 AI

https://veo-3-ai.org/
2•Evan233•35m ago•1 comments

Show HN: GitHub Repo Agent – an agent that explores and reasons on GitHub repos

https://github.com/gauravvij/GithubRepoAgent
3•gauravvij137•38m ago•0 comments

I Put a Full JVM Inside a Browser Tab

https://bmarti44.substack.com/p/i-put-a-full-jvm-inside-a-browser
3•todsacerdoti•40m ago•0 comments

Full speech pipeline in native Swift/MLX – ASR, TTS, speech-to-speech, on-device

https://github.com/ivan-digital/qwen3-asr-swift
2•ipotapov•40m ago•1 comments

People in northeast BC say rest of province should embrace year-round time zone

https://www.cbc.ca/news/canada/british-columbia/time-change-british-columbia-9.7112139
2•divbzero•41m ago•0 comments

California to require age verification for all OS including Linux

https://www.tomshardware.com/software/operating-systems/california-introduces-age-verification-law
4•hambes•42m ago•1 comments

Rare Not Random – Using Token Efficiency for Secrets Scanning

https://lookingatcomputer.substack.com/p/rare-not-random
2•boyter•43m ago•0 comments

Strict Monospace Font for LLM-CLI users using Chinese Japanese Korean, CodexMono

https://www.npmjs.com/package/@monolex/codexmono
4•monokist•47m ago•1 comments

Working on Things That Suck

https://mayberay.bearblog.dev/working-on-things-that-suck/
2•mugamuga•49m ago•0 comments

Ask HN: How Do Emergency Alerts on Phone Work?

2•rishikeshs•54m ago•2 comments

US President struggles to explain why he launched another Middle Eastern war

https://www.ft.com/content/fd31c6ad-39f0-4fae-851c-fadf44f006eb
10•Jimmc414•1h ago•3 comments

Apple Does Value (Week)

https://om.co/2026/03/02/apple-does-value-week/
1•tosh•1h ago•1 comments

The Pointless War Between The Pentagon and Anthropic

https://www.wsj.com/opinion/the-pointless-war-between-the-pentagon-and-anthropic-9284fd37
5•jrosenblatt•1h ago•2 comments

Show HN: wo; a better CD for repo management

https://github.com/anishalle/wo
1•itsagamer124•1h ago•0 comments