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.

Excuse Me but Eating "Ten Million Dogs and Cats" Why

https://clipnotebook.com/p/671d1ace-bc25-478e-b631-42c226dfc360
2•ClipNoteBook•31s ago•0 comments

Congress screwed up on the GENIUS act: stablecoin holders have fifth priority

https://creditslips.org/2025/12/02/sorry-to-break-it-to-you-geniuses-under-the-genius-act-the-hol...
1•semiquaver•2m ago•0 comments

AI toys for kids talk about sex and issue CCP talking points, tests show

https://www.nbcnews.com/tech/tech-news/ai-toys-gift-present-safe-kids-robot-child-miko-grok-alilo...
1•greesil•3m ago•1 comments

Being a SysAdmin Is Hard

https://about.tree.ht/blog/treehut-outages-december-2025
1•todsacerdoti•3m ago•0 comments

PAG: A Formal Grammar for Structuring LLM Prompts

https://banes-lab.com/pag
1•jay-baleine•4m ago•0 comments

Welcome to the golden age of employee monitoring

https://www.businessinsider.com/employee-surveillance-how-boss-monitors-your-work-2025-12
1•cebert•6m ago•0 comments

A new C99 optimizing compiler, with full testsuite

https://github.com/rustcoreutils/posixutils-rs/releases/tag/v0.7.0
2•jgarzik•8m ago•1 comments

Show HN: A tiny Rust CLI tool to clean and fix messy CSV files

https://github.com/QuickCsv/QuickCsvTool
1•csvtool•11m ago•0 comments

Project Athena Strategic Plan (Jared Isaacman, NASA Head Nominee)

https://drive.google.com/file/d/16j95BNM4wDRD2bcHFhYJ7m-L3pAThuUf/view
1•mkmk•14m ago•0 comments

A Case for Owning Your Data

https://steiblys.com/articles/own-your-data
1•imbusy111•16m ago•0 comments

Innocent Man Gets Arrested at Peppermill Casino After AI Says He's Someone Else [video]

https://www.youtube.com/watch?v=B9M4F_U1eEw
3•lurk2•20m ago•1 comments

How Well Do LLMs Understand Tunisian Arabic?

https://arxiv.org/abs/2511.16683
1•PaulHoule•24m ago•0 comments

LMArena Is a Cancer on AI

https://surgehq.ai/blog/lmarena-is-a-plague-on-ai
1•EvgeniyZh•31m ago•0 comments

Exploring the chip on a contactless payment card

https://www.facebook.com/groups/ElectronicParts/posts/2955721817950467/
1•mzs•31m ago•0 comments

iOS TCC Lets Hacker Feed Reach Undocumented Liverpool Service

1•TheLogReader•33m ago•0 comments

Linux 6.18 Changelog

https://kernelnewbies.org/Linux_6.18
2•mfrw•34m ago•0 comments

The Mastermind Box Cover

https://www.mcsweeneys.net/articles/the-mastermind-box-cover-what-the-hell-were-they-thinking
2•wawayanda•37m ago•1 comments

Everything you need to know about GPT-5.2

https://www.augmentedswe.com/p/gpt-5-2-for-coding
1•wordsaboutcode•37m ago•0 comments

Ask HN: What was the most humble living situation you had in your early days?

1•rblion•39m ago•1 comments

Letting the Minecart Crash

https://nik.art/letting-the-minecart-crash/
1•herbertl•45m ago•0 comments

Post-Quantum Cryptography (PQC) Support in Nginx

https://blog.nginx.org/blog/pqc-nginx
1•thunderbong•46m ago•0 comments

Show HN: Create AI Videos and Images

https://lensgoai.co/
2•tancky777•46m ago•0 comments

PSRT v2.0 – A Generative Theory of Intelligence and Meaning

https://zenodo.org/records/17905099
1•nettalk83•48m ago•1 comments

The Jim Sharman Diaries: Behind the Scenes on the Rocky Horror Show, 1970s

https://flashbak.com/jim-sharman-rocky-horror-show-photos-and-script-480230/
2•ohjeez•51m ago•0 comments

Weird Generalization and Inductive Backdoors: New Ways to Corrupt LLMs

https://arxiv.org/abs/2512.09742
2•joegibbs•52m ago•1 comments

Giant 3D map shows almost every building in the world

https://www.nature.com/articles/d41586-025-04036-x
2•signa11•54m ago•0 comments

Show HN: Seer – open-source market opportunity detection for indie developers

https://github.com/mx-seer/seer
1•mendexio•57m ago•1 comments

Head of AI at Cline Fired

https://twitter.com/sdrzn/status/1999247099310084312
4•agentifysh•58m ago•1 comments

The added architectural complexity of MACH [2023]

https://afonsopraca.com/articles/the-added-architectural-complexity-of-mach
1•afonsopraca•1h ago•0 comments

Project Harp [1964-1968]

https://en.wikipedia.org/wiki/Project_HARP
4•sans_souse•1h ago•0 comments