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

Comments

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

ABC pulls Kimmel's late-night show over Charlie Kirk comments after FCC threats

https://www.theguardian.com/us-news/live/2025/sep/17/donald-trump-charlie-kirk-free-speech-nyt-cd...
1•andsoitis•31s ago

Computer Networks: A Systems Approach

https://book.systemsapproach.org/index.html
1•tripdout•3m ago•0 comments

Show HN: Turn oil paintings into interactive story gifts

https://sendstories.zingandzap.com
1•erosss•10m ago•0 comments

ABC Pulls Jimmy Kimmel Off Air for Charlie Kirk Comments After FCC Pressure

https://www.nytimes.com/2025/09/17/business/media/abc-jimmy-kimmel.html
6•zzzeek•19m ago•1 comments

No CSS, No JavaScript. Longevity on the Web

https://jch.github.io/posts/2025-09-18-no-css-no-js.html
1•jollyjerry•20m ago•0 comments

Anyone Can Cook

https://booplet.com/blog/anyone-can-cook/
1•greentfrapp•23m ago•0 comments

From the Diaries of John Henry, Book 7 – Inevitable

https://medium.com/from-the-diaries-of-john-henry/book-7-inevitable-fef0091f42c8
1•nicholast•28m ago•1 comments

Meta Connect 2025 [video]

https://www.youtube.com/watch?v=80s0chTOsK0
1•babelfish•36m ago•0 comments

"The End of Extractive AI: A Monograph on Presence" → Link to Zenodo

https://zenodo.org/records/17148689
1•antiparty•37m ago•0 comments

Slack is extorting us with a $195k/yr bill increase

https://skyfall.dev/posts/slack
138•JustSkyfall•41m ago•41 comments

Facebook Messenger inserting web links into regular text?

2•reassess_blind•41m ago•0 comments

Netflix to Add NASA+ as It Launches into Live Streaming Feeds

https://www.hollywoodreporter.com/tv/tv-news/netflix-nasa-plus-live-stream-channel-1236302851/
2•bookofjoe•46m ago•0 comments

ChatGPT context window has an error

https://chatgpt.com/share/68cb6054-10a4-8011-98c1-bcc65b9d0743
1•razodactyl•49m ago•0 comments

Trump designates anti-fascist Antifa movement as a terrorist organization

https://www.reuters.com/world/us/trump-designates-anti-fascist-antifa-movement-terrorist-organiza...
19•hypeatei•52m ago•28 comments

The Climate Change Paradox

https://www.quantamagazine.org/the-climate-change-paradox-20250915/
1•tzury•53m ago•1 comments

Target intestinal inflammation with locked nucleic acids via lipid nanoparticles

https://www.nature.com/articles/s41467-025-63037-6
2•crescit_eundo•55m ago•0 comments

Hypervisor 101 in Rust

https://tandasat.github.io/Hypervisor-101-in-Rust/
20•pykello•1h ago•0 comments

PagerDuty's Kafka Outage Silences Alerts for Companies

https://www.infoq.com/news/2025/09/pagerduty-kafka-outage/
2•teleforce•1h ago•0 comments

I regret to inform you Meta's new smart glasses are the best I've ever tried

https://web.archive.org/web/20250918005001/https://www.theverge.com/tech/779566/meta-ray-ban-disp...
3•anythingworks•1h ago•1 comments

Gnome 49, "Brescia"

https://release.gnome.org/49/
4•Bogdanp•1h ago•0 comments

Pentagon Lawyers Raise Concerns over Trump's Strikes on Alleged Drug Boats

https://www.wsj.com/politics/national-security/pentagon-lawyers-raise-concerns-over-trumps-drug-b...
6•JumpCrisscross•1h ago•0 comments

XAI Execs Clashed with Musk Advisers over Financial Projections Before Departing

https://www.wsj.com/tech/ai/elon-musk-xai-executives-advisers-clash-eac3913b
1•JumpCrisscross•1h ago•0 comments

The Chess Cheating Epidemic

https://quillette.com/2025/09/16/the-chess-cheating-epidemic/
1•bookofjoe•1h ago•1 comments

Learning Languages with the Help of Algorithms

https://www.johndcook.com/blog/2025/09/17/learning-languages-with-the-help-of-algorithms/
1•ibobev•1h ago•0 comments

Decoding a Disorder at the Interface of Mind and Brain

https://www.scientificamerican.com/article/decoding-a-disorder-at-the-interface-of-mind-and-brain/
1•nibblenum•1h ago•1 comments

Engineering Highly Cellularized Living Materials via Mechanical Agitation

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adfm.202515436
2•PaulHoule•1h ago•0 comments

Meta Ray-Ban Display with Neural Band

https://www.meta.com/ai-glasses/meta-ray-ban-display-glasses-and-neural-band/
2•zhyder•1h ago•1 comments

Ap2 Protocol Documentation

https://ap2-protocol.net/
2•QingWu•1h ago•0 comments

The AI Raj: How tech giants are recolonizing power

https://thebulletin.org/2025/09/the-ai-raj-how-tech-giants-are-recolonizing-power/
1•pseudolus•1h ago•0 comments

How the classic McIntosh lost the battle for Apple supremacy

https://thehustle.co/originals/how-the-classic-mcintosh-lost-the-battle-for-apple-supremacy
1•paulpauper•1h ago•0 comments