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.

Show HN: GhostDeck – a Mac music player with a hand-written Metal renderer

https://ghost-deck.app/
1•djordjejanjic•29s ago•0 comments

Are you using email inbox for customer support?

https://thesupportqueue.substack.com/p/email-customer-support-has-an-ownership
1•vinothkumarnaga•57s ago•0 comments

An Interactive Introduction to Fourier Transforms

https://www.jezzamon.com/fourier/index.html
1•sebg•4m ago•0 comments

Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML

https://jointhefreeworld.org/blog/articles/lisps/parsing-expression-grammar-lisp-org-convert-to-h...
1•jjba23•5m ago•0 comments

Many surgical interventions are little better than placebo

https://www.economist.com/science-and-technology/2026/09/23/many-surgical-interventions-are-littl...
3•bookofjoe•8m ago•1 comments

Mistral Vibe Shell Permission Bypass Leading to Arbitrary Code Execution

https://blog.secmate.dev/posts/mistral-vibe-cve-2026-87987-cve-2026-87984/
1•enitmar•10m ago•0 comments

Meta's new Muse AI Agent read Jason Aten's messages database

https://daringfireball.net/linked/2026/09/22/aten-muse
3•ch_sm•12m ago•0 comments

Fourier Analysis: Drawing Llamas with Circles

https://adekau.github.io/posts/2020/llamas.html
1•cebert•12m ago•0 comments

Street Photographer Shoots 'Weird' Photos on Dyson's New CameraJet Toothbrush

https://petapixel.com/2026/09/14/street-photographer-shoots-weird-photos-on-dysons-new-camerajet-...
2•tlyleung•12m ago•0 comments

Squelette – keep AI coding agents inside the scope you approved

https://github.com/JyMinet/squelette
1•JyMINET2•13m ago•0 comments

CheatBench: Measuring Reward Gaming in AI Agents

https://www.cheatbench.ai/
1•gumby•14m ago•0 comments

Zetopoiesis: From Seeking Through Representational Absence to Conceptual Genesis

https://zenodo.org/records/22936180
1•RhizomaticMind•14m ago•0 comments

iPhone 18 Pro with La Croix cooling

https://birchtree.me/blog/iphone-18-pro-with-la-croix-cooling/
2•surprisetalk•15m ago•0 comments

Suits Are Better Tech Than Modern Clothes

https://devz.cl/posts/the-lost-tech-in-contemporary-clothing/
1•DanielVZ•17m ago•0 comments

Lovable is launching a chat competitor

https://lovable.dev/blog/chat-for-free
1•h1fra•20m ago•0 comments

Hackers influence ChatGPT and Gemini to direct users to scam centers

https://medium.com/@arielsimon/dark-sourcery-how-hackers-manipulate-ai-to-scam-you-88df434d2073
5•ArielSimon•21m ago•0 comments

AI progress is speeding up dramatically – here's why you should care [video]

https://www.youtube.com/watch?v=DKA5AkrQfxo
1•mgh2•26m ago•1 comments

Show HN: Wand – Let Muse control your Mac from your phone

https://getwand.app/
3•anonymousgoose•27m ago•0 comments

Scoop: Trump allies open new front against Anthropic CEO over AI "doomerism"

https://www.axios.com/2026/09/24/trump-anthropic-ai-doomerism-dario-amodei
3•koolhead17•31m ago•1 comments

How to serve trillions of tokens for trillion-parameter coding agents

https://modal.com/blog/trillion-tokens-trillion-parameters
1•charles_irl•31m ago•0 comments

Joby Just Made History

https://marbletech.us/p/joby-just-made-history
2•flyingcars•31m ago•0 comments

What is WCAG for PDF? A practical guide to PDF Accessibility

https://pdf4wcag.com/blog-news/what-is-wcag-for-pdf
3•JilBill•39m ago•4 comments

Gen Z are shunning private equity's restaurant takeover

https://www.theguardian.com/food/2026/sep/21/gen-z-private-equity-restaurants
2•helsinkiandrew•40m ago•2 comments

Modern Object Pascal Introduction for Programmers – Castle Game Engine

https://castle-engine.io/modern_pascal
3•birdculture•42m ago•0 comments

Christophe Laudamiel: Planted Memory, Cultivated Ethics, and More Perfumery

https://worldsensorium.com/christophe-laudamiel-planted-memory-cultivated-ethics-and-more-blossom...
2•dnetesn•42m ago•0 comments

The Remedy Around Us

https://blue-continuum.com/the-remedy-around-us
1•dnetesn•43m ago•0 comments

Show HN: XHTML – Expert HTML

https://xhtml.es/
3•plaguna•43m ago•0 comments

Show HN: MRR Growth Simulator

https://www.projectecho.io/tools/mrr-growth-calculator
1•hawkeye77787•44m ago•0 comments

Show HN: A free, single file 3D visualization for user/device activity data

https://github.com/SouravTeddy/3d-data-globe
1•Sourav_UncoverR•44m ago•0 comments

'Lately, my algorithm is trash'

https://news.harvard.edu/gazette/story/2026/09/lately-my-algorithm-is-trash/
2•DeepLogin•45m ago•0 comments