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

Comments

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

The Discovery of Lin Yutang's MingKwai Chinese Typewriter

https://typewriterrevolution.com/the-discovery-of-lin-yutangs-mingkwai-chinese-typewriter/
1•superjan•2m ago•0 comments

Show HN: Imesde – A tiny, ephemeral vector engine for streaming data (Rust)

https://github.com/imesde/imesde
1•alessiopel•2m ago•1 comments

The British Empire's Resilient Subsea Telegraph Network

https://subseacables.blogspot.com/2025/12/the-british-empires-resilient-subsea.html
1•giuliomagnifico•3m ago•0 comments

Show HN: Spraff – Voice and text AI chat, self-hostable, no data retention

https://github.com/martinpllu/spraff
1•pllu•5m ago•0 comments

Far-right online dating site leaked

https://okstupid.lol/
1•_tk_•6m ago•0 comments

SMTMSMT: Gluing Together CVC5 and Z3 Nelson Oppen Style

https://www.philipzucker.com/glue-cvc5-z3/
1•matt_d•11m ago•0 comments

Fucking Approachable Swift Concurrency

https://fuckingapproachableswiftconcurrency.com/en/
2•wrxd•12m ago•0 comments

The state of AI – December 2025

https://www.ashprabaker.com/state-of-play
1•_ash_•13m ago•1 comments

Jan Łukasiewicz

https://plato.stanford.edu/entries/lukasiewicz/
1•danielam•16m ago•0 comments

MongoDB CVE CVE-2025-14847 – what K8s users should know?

https://www.armosec.io/blog/cve-2025-14847-mongobleed-memory-disclosure/
1•jkaftzan•17m ago•1 comments

Calibri Wasn't Fit for the State Department; Neither Is Times New Roman

https://hsu.cy/2025/12/times-new-american/
3•firexcy•18m ago•0 comments

Simple Made Easy – Rich Hickey

https://www.infoq.com/presentations/Simple-Made-Easy/
2•thunderbong•18m ago•0 comments

Nano Banana Pro: The End of Photographic Evidence, Again

https://julienposture.substack.com/p/the-end-of-photographic-evidence
2•julienposture•20m ago•1 comments

When robot taxis get stuck, a secret army of humans comes to the rescue

https://www.washingtonpost.com/technology/2025/12/25/waymo-robots-human-work/
1•1vuio0pswjnm7•23m ago•2 comments

Top US law firms hand associates $300k-plus bonuses

https://www.ft.com/content/d1db1264-27b1-48db-9576-16c0ca118df6
1•1vuio0pswjnm7•24m ago•0 comments

Groq investor sounds alarm on data centers

https://www.axios.com/2025/12/29/groq-alex-davis-data-center-concerns
1•giuliomagnifico•26m ago•1 comments

Show HN: I built a CLI to dump all JavaScript/CSS/assets from any webpage

https://github.com/timf34/pagesource
1•timf34•27m ago•0 comments

Singapore Study Links Heavy Infant Screen Time to Teen Anxiety

https://www.bloomberg.com/news/articles/2025-12-30/singapore-study-links-heavy-infant-screen-time...
2•1vuio0pswjnm7•27m ago•0 comments

Code-based music creation and performance tool

https://sonic-pi.net/
1•saikatsg•30m ago•0 comments

Apache Spark Isn't "Fast" by Default; It's Fast When You Use It Correctly

https://www.netcomlearning.com/blog/apache-spark
1•birdculture•31m ago•0 comments

Raytracing in One Weekend

https://raytracing.github.io/
1•fanf2•32m ago•0 comments

Mojo Vision

https://docs.modular.com/mojo/vision/
1•tosh•33m ago•0 comments

Free eBook –> Website Monitoring Trends in 2026

https://alertsleep.com/free-ebook
1•thepatrykooo•34m ago•0 comments

Ask HN: What book are you currently reading?

4•sujayk_33•42m ago•6 comments

How Liquid Dampers in Skyscrapers Work

https://www.youtube.com/watch?v=fudWbvE8ZKw
1•akshatjiwan•46m ago•0 comments

The U.S. offers Ukraine a 15-year security guarantee for now

https://www.npr.org/2025/12/29/g-s1-103906/ukraine-russia-trump-zelenskyy-security
2•geox•46m ago•0 comments

Ask HN: What skills and projects should an unemployed software dev focus on?

2•MITfather•47m ago•3 comments

I built a receipt printer for GitHub issues

https://aschmelyun.com/blog/i-built-a-receipt-printer-for-github-issues/
1•itzlambda•53m ago•1 comments

Documentation for Developers

https://leaddev.com/communication/build-documentation-developers-actually-navigate
1•shehabas•54m ago•0 comments

The ARR Illusion in the Age of AI

https://oswarld.com/eng/insight/250816_ai-arr-illusion-gmv-vs-arr
1•haebom•54m ago•0 comments