frontpage.
newsnewestaskshowjobs

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.

ICE detainees used facility's video calling software to expose conditions inside

https://www.theverge.com/report/1008342/folkston-georgia-ice-detention-hunger-strike-video
1•HotGarbage•3m ago•0 comments

Show HN: Sibuna an open source web application firewall with proof of work

https://github.com/insanai/sibuna
1•vikrantrathore•3m ago•0 comments

Keyboard differences between Windows and Macs

https://unsung.aresluna.org/deeper-dive-keyboard-differences-between-windows-and-macs/
2•sohkamyung•4m ago•0 comments

Robium – Physical AI harness for coding agents

https://github.com/robium-ai/robium
1•enesakar•5m ago•0 comments

Who are we Now? – Jessitron

https://jessitron.com/2026/08/30/who-are-we-now/
1•pavel_lishin•6m ago•0 comments

Show HN: Rename Super Intelligence Back to Artificial Intelligence

https://chromewebstore.google.com/detail/si-→-ai/cfpagmhjlhnbjabgaoeobkciklolaekn
2•freakynit•7m ago•1 comments

Anger as man sentenced to death for Facebook comment

https://www.themirror.com/news/world-news/anger-man-sentenced-death-facebook-2060304
2•bcaulfield•8m ago•0 comments

Can Reading Make You Happier? (2015)

https://www.newyorker.com/culture/cultural-comment/can-reading-make-you-happier
2•the-mitr•19m ago•0 comments

U.N. Warns Against Technology Used to Read Citizens' Minds

https://www.nytimes.com/2026/10/08/world/europe/united-nations-technology-warning.html
2•reaperducer•20m ago•0 comments

Thinking Will Become a Hobby

https://www.spinellis.gr/blog/20261008/?li261008
4•vinhnx•24m ago•0 comments

Gentoo loses several sponsorships, seeking replacement infrastructure sponsors

https://itsfoss.com/news/gentoo-infrastructure-sponsors-call/
2•iamnothere•24m ago•1 comments

The Hetzner Cloud network stack

https://www.hetzner.com/blog/the-hetzner-cloud-network-stack-history-and-technical-overview/
2•vinhnx•24m ago•0 comments

A Family Video Game as a Hands-On Lesson in Creating with AI

https://stook-runner-family-game.paolo564466.chatgpt.site/
2•chefpaolofontan•26m ago•0 comments

Read to Your Children

https://jamespember.substack.com/p/read-to-your-children
4•jep888•34m ago•0 comments

What Should You Make of Gravity Linux?

https://boxed.news/2026/09/30/gravity-linux-m4-mac-mini-support
3•colinprince•36m ago•0 comments

A website designed to outlive its web host

https://ultimatedotcom.com/
2•JohnWayne_SV•38m ago•1 comments

I predict Apple will open their platforms within the next five years

https://jarbus.net/blog/apple-prediction/
4•jarbus•43m ago•3 comments

What should we tell our students?

https://terrytao.wordpress.com/2026/10/08/what-should-we-tell-our-students/
26•sajid•44m ago•14 comments

Instagram is sorry it gave users too much Creed

https://www.cnn.com/2026/10/08/entertainment/creed-instagram-suggested-music-cec
2•1659447091•45m ago•0 comments

Iran's drones hit America's Achilles heel

https://www.politico.com/news/2026/10/08/iran-drones-us-military-weakness-01110970
8•snarky-comments•46m ago•0 comments

Isoso CLI: Get WCAG/A11y Compliant

https://github.com/isoso-dev/isoso
2•marrykassa•51m ago•0 comments

My Startup Path (2007)

http://paulbuchheit.blogspot.com/2007/03/my-startup-path.html
5•mosesk•51m ago•0 comments

Relevance Is Not Preference: What We Learned Training ZooWork-ShopRanker

https://zoowork.ai/blog/relevance-is-not-preference-shopranker/
4•anna_1101•51m ago•0 comments

Isoso: Get WCAG/A11y Compliant

https://isoso.dev
1•marrykassa•52m ago•0 comments

Stop complaining about enshittification. Use the alternatives

https://a.l3x.in/blog/use-the-unshittified-alternatives/
6•alexfortin•54m ago•2 comments

Show HN: Veil – Zero-knowledge messenger with post-quantum encryption

https://tryveil.app/architecture
3•veil-im•55m ago•0 comments

US bars Microsoft, Adobe, and major IT firms from green card program

https://techcrunch.com/2026/10/08/us-bars-microsoft-adobe-and-major-it-firms-from-green-card-prog...
5•owenthejumper•1h ago•1 comments

Three Sweltering Days Shredding the High Seas

https://defector.com/i-spent-three-sweltering-days-shredding-the-high-seas-at-jogging-pace-and-it...
2•lantry•1h ago•0 comments

Mind, Amplified Now in Beta

https://www.archii.ai/
3•lbrendle•1h ago•1 comments

Richard Garriott is officially regaining control of the Ultima series

https://www.videogameschronicle.com/news/richard-garriott-is-officially-regaining-control-of-the-...
11•lnguyen•1h ago•2 comments