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

Show HN: Enoch – Control Plane for Autonomous AI Research

https://github.com/alias8818/enoch-agentic-research-system
2•aliasocracy•2m ago•0 comments

Grok 'drive an iron nail through the mirror while reciting Psalm 91 backwards'

https://www.theguardian.com/technology/2026/apr/24/musk-grok-x-ai-researchers-delusional-advice-i...
2•iamflimflam1•7m ago•1 comments

Revived Mozilla's BrowserQuest game on popular demand play online for free

https://threej.in/games/browserquest/index.html
1•cryptpal•8m ago•0 comments

Why Did Huawei Build Its Own Programming Language? [video]

https://www.youtube.com/watch?v=ujpl5_TmAaE
1•melchizedek6809•9m ago•0 comments

Why TUIs Are Back

https://wiki.alcidesfonseca.com/blog/why-tuis-are-back/
1•vinhnx•12m ago•0 comments

BTC Pulse – 4-factor composite model · Real-time macro signals

https://btcpulse.vercel.app/
1•tvvocold•13m ago•0 comments

Online Signature Generator

https://www.online-unterschriftgenerator.de/
1•Hamaq•13m ago•0 comments

Who Killed Spirit Airlines?

https://www.thebignewsletter.com/p/who-killed-spirit-airlines
1•chmaynard•14m ago•0 comments

Word Clouds Considered Harmful (2011)

https://jacobharr.is/published/word-clouds
1•Tomte•15m ago•0 comments

Show HN: A modern Git based age-encrypted secrets manager for teams

https://github.com/sayanarijit/cottage
1•sayanarijit•15m ago•0 comments

Local-first Kubernetes UI in a single Go binary

https://github.com/skyhook-io/radar
5•nadaverell•16m ago•1 comments

Executable installer will stop being released with Python 3.16

https://www.python.org/downloads/release/pymanager-261/
2•ankitg12•22m ago•0 comments

Learning Pseudorandom Numbers with Transformers

https://arxiv.org/abs/2510.26792
1•pizza•26m ago•0 comments

Cajal – Local AI that writes peer-reviewed papers with simulated peer review

https://huggingface.co/Agnuxo/CAJAL-4B-P2PCLAW
1•Frank1976•31m ago•0 comments

Quantum computers will break RSA-2048 by February 2032

https://gagliardoni.net/#20260503_rsa_broken_2032
1•tomgag•32m ago•0 comments

Has anyone tried using Hyperframes?

https://github.com/heygen-com/hyperframes
1•nastrofa•33m ago•0 comments

I Don't Vibe Code

https://jacobharr.is/personal/i-dont-vibe-code
1•birdculture•33m ago•0 comments

A Wandering Mind Is an Unhappy One (2010)

https://www.scientificamerican.com/article/a-wandering-mind-is-an-un/
1•the-mitr•37m ago•0 comments

The Human Line Project: Documenting AI Chatbot Harm

https://www.thehumanlineproject.org/
1•thinkingemote•39m ago•0 comments

Show HN: I made a website for couples in a long distance relationship

https://www.couples-questions.com
2•mahfouz22•39m ago•0 comments

AMD Readies Full Open-Source HDMI 2.1 Support for Linux

https://www.techpowerup.com/348723/amd-readies-full-open-source-hdmi-2-1-support-for-linux
3•SockThief•41m ago•0 comments

Context Mode v1.0.0

https://context-mode.mksg.lu/
2•ankitg12•42m ago•1 comments

Musk vs. Altman week 1: Elon Musk says he was duped, warns AI could kill us all

https://www.technologyreview.com/2026/05/01/1136800/musk-v-altman-week-1-musk-says-he-was-duped-w...
2•joozio•45m ago•0 comments

ZenTTY – A terminal that gets out of your way

https://zentty.org/
1•fdb•48m ago•0 comments

Show HN: Julius, a New Lisp Implementation

https://github.com/tgflynn/Julius
1•tgflynn•49m ago•1 comments

Musk's AI told me people were coming to kill me (BBC)

https://www.bbc.com/news/articles/c242pzr1zp2o
6•walden789•50m ago•0 comments

Physicists have measured 'negative time' in the lab

https://theconversation.com/physicists-have-measured-negative-time-in-the-lab-278996
2•thunderbong•53m ago•0 comments

Arknet – decentralized AI inference, fair launch, one binary

https://github.com/st-hannibal/arknet
1•st-hannibal•54m ago•0 comments

HP 3585A spectrum analyzer teardown

http://7400.me/2026/04/30/HP3585A/
2•picture•55m ago•0 comments

Loss of epigenetic information as a cause of mammalian aging

https://www.cell.com/cell/fulltext/S0092-8674(22)01570-7
3•andsoitis•1h ago•0 comments