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

Comments

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

Why the US Navy Won't Blast the Iranians and 'Open' Strait of Hormuz

https://responsiblestatecraft.org/iran-strait-of-hormuz/
1•KoftaBob•1m ago•0 comments

Semlib: Semantic Data Processing

https://anishathalye.com/semlib/
1•vismit2000•3m ago•0 comments

I built an O(1) physics engine to stop LLM hallucinations in construction

https://flooring-ai-matrix.streamlit.app/
1•svid•7m ago•0 comments

"An Endless Stream of AI Slop"

https://arxiv.org/abs/2603.27249
2•jruohonen•13m ago•0 comments

Cursor rules that prevent AI from hallucinating bad Next.js code

https://github.com/vibestackdev/vibe-stack
1•vibestackdev•14m ago•0 comments

Positron Flux: from DORA dashboards to explaining what changed

https://sklivvz.com/posts/introducing-positron-flux
3•sklivvz1971•16m ago•0 comments

Engineering Blog Posts from Top Tech Companies

https://www.engineering.fyi
1•abracos•17m ago•0 comments

Prompt intensity threshold effect on AI-generated invention quality (preprint)

https://zenodo.org/records/19347700
1•h_hasegawa•17m ago•0 comments

Causality optional? Testing the "indefinite causal order" superposition

https://arstechnica.com/science/2026/03/getting-formal-about-quantum-mechanics-lack-of-causality/
1•rbanffy•18m ago•0 comments

The Horrors That Could Lie Ahead If Vaccines Vanish

https://projects.propublica.org/childhood-vaccines-deaths-modeling/
3•littlexsparkee•23m ago•0 comments

Does RAG Help AI Coding Tools?

https://www.mikeayles.com/blog/rag-coding-tools/
1•mikeayles•24m ago•1 comments

What Happened to Procomm Plus

https://dfarq.homeip.net/what-happened-to-procomm-plus/
1•zoidb•24m ago•0 comments

HN: AI-native investing app that builds and adapts thematic portfolios to you

https://basketsai.com
1•pranav6226•25m ago•1 comments

The Racket Programming Language

https://www.racket-lang.org/
3•h4ch1•27m ago•0 comments

Golang Constmap by Daniel Lemire

https://twitter.com/lemire/status/2038320406432494059
2•pjf•27m ago•1 comments

What are the best resources to learn about Harness Engineering?

1•udayan_w•28m ago•0 comments

After 16 years and $8B, the military's new GPS software still doesn't work

https://arstechnica.com/space/2026/03/after-16-years-and-8-billion-the-militarys-new-gps-software...
2•rbanffy•28m ago•0 comments

Claude Code's source code has been leaked via a map file in their NPM registry

https://twitter.com/Fried_rice/status/2038894956459290963
38•treexs•31m ago•14 comments

LibreTranslate: Free and Open Source Machine Translation API

https://github.com/LibreTranslate/LibreTranslate
2•ahamez•33m ago•0 comments

David Foster Wallace and the problem of loneliness [video]

https://www.youtube.com/watch?v=FCfpOugmd9E
1•simonebrunozzi•35m ago•0 comments

£5M Funding for supply chain security innovation in UK

https://apply-for-innovation-funding.service.gov.uk/competition/2421/overview/3d6991fa-73b2-48c0-...
4•anonhaven•43m ago•0 comments

Tell HN: DeepL Moving Data to AWS

3•bilekas•44m ago•1 comments

The First Bullshit

https://www.joanwestenberg.com/the-worlds-first-bullshit/
2•viermalbe•44m ago•0 comments

Monitor Claude Code Usage with Grafana

https://braw.dev/blog/2026-03-28-monitor-claude-usage-with-grafana/
2•kisamoto•45m ago•1 comments

Databricks Compromised by TeamPCP

https://www.cryptika.com/teampcp-supply-chain-attack-allegedly-compromised-databricks-platform/
2•debarshri•46m ago•0 comments

Show HN: Stochos – Keyboard driven mouse control

https://github.com/museslabs/stochos
1•ploMP4•48m ago•0 comments

Fast and Gorgeous Erosion Filter

https://blog.runevision.com/2026/03/fast-and-gorgeous-erosion-filter.html
1•runevision•50m ago•1 comments

Tell HN: If your agent can create a PR, it can merge it too

https://github.com/orgs/community/discussions/182732
1•jamesfisher•52m ago•0 comments

The Reed and Pickup – The early internet was a feeling

https://reedandpickup.com/2026/03/30/the-early-internet-was-a.html
1•viermalbe•53m ago•0 comments

Caltech quantum startup Oratomic launches with achieving scaling breakthrough

https://www.oratomic.com/news/launch-announcement
1•chrysander•55m ago•1 comments