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.

MCP tools groups. How Datadog proved the pattern

https://www.speakeasy.com/blog/mcp-tool-filtering-datadog
1•simplesagar•19s ago•0 comments

Cooling in Space

https://guille.site/posts/space-cooling/
1•LolWolf•2m ago•0 comments

Montir – The Beli for Movies

https://apps.apple.com/us/app/montir/id6776378113
1•michaelahn•2m ago•1 comments

He Hacked Teslas for Elon Musk. Now He's Launching a $100M AI Cyber Agent

https://www.forbes.com/sites/thomasbrewster/2026/06/10/elon-musk-favorite-hacker-launches-100-mil...
1•MistyMouse•3m ago•0 comments

An interactive tour to the terrific technical debt of Arabic typography

https://lr0.org/blog/p/arabic/
1•ghd_•3m ago•0 comments

Learning a regular language by inferring a DFA with the TTT algorithm

https://rahul.gopinath.org/post/2026/06/09/ttt-grammar-inference/
1•fanf2•3m ago•0 comments

Diabetes org apologizes for ejecting scientists over criticism of Trump

https://arstechnica.com/health/2026/06/diabetes-org-apologizes-for-ejecting-scientists-over-criti...
1•leephillips•5m ago•0 comments

Playing with Payphones

https://www.theguardian.com/society/2026/jun/12/payphones-phone-booths-free-calls-australia-resur...
1•mopoke•5m ago•0 comments

3D necroprinting: Leveraging biotic material as the nozzle for 3D printing

https://www.science.org/doi/10.1126/sciadv.adw9953
1•oidar•6m ago•0 comments

"Regulate AI? And lose our edge?"

https://deep.liveblog365.com/en/index-en.html?post=283
1•TonyBorlini•7m ago•0 comments

Show HN: NalityAI – desktop voice assistant with 9 personalities built in Python

https://nalityai.com/
1•Lashaga•7m ago•1 comments

Photos to 3D Model Offline – Cross-Platform App (Android, Desktop, Web)

https://github.com/yeicor/colmap-openmvs-app
1•yeicor•8m ago•1 comments

Tokenomics

https://www.citadelsecurities.com/news-and-insights/global-macro-strategy/tokenomics/
1•vikrum•8m ago•0 comments

Show HN: Free Music for Money

https://0g.software/freemusicformoney
1•0gs•8m ago•1 comments

Show HN: OpenClacky – A token-efficient personal agent written in Ruby

https://www.openclacky.com/
1•gemHunter•11m ago•0 comments

The University in the AI Era

https://htmx.org/essays/universities-and-ai/
1•recursivedoubts•11m ago•1 comments

Elon Musk under fire for stoking anti-immigrant riots in Belfast

https://www.nbcnews.com/world/united-kingdom/belfast-riots-elon-musk-anti-immigrant-violence-stab...
3•Chinjut•13m ago•0 comments

Turing Conjugation

https://lacker.substack.com/p/turing-conjugation
1•stopachka•13m ago•0 comments

Show HN: Plannotator – annotate agent plans, diffs, and HTML

https://github.com/backnotprop/plannotator
2•ramoz•17m ago•0 comments

It feels to practice for IOAI in Iran

https://howitfeels.netlify.app/
1•linmer•18m ago•0 comments

Extended interview: Steven Spielberg about Disclosure Day [video]

https://www.youtube.com/watch?v=MjAp_NlOH1g
1•wslh•18m ago•1 comments

Show HN: Artist Kit – One-Page Website Builder for DJs and Music Artists

https://www.artistkit.co/
3•truetaurus•19m ago•1 comments

Webflow hosting is currently down

https://statusgator.com/services/webflow
2•datadrivenangel•20m ago•0 comments

Local Privacy Filter for Claude Code

https://github.com/outgate-ai/og-local
1•alikh31•21m ago•0 comments

Malware developers added nuclear and biological weapons text to to their spyware

https://twitter.com/jsrailton/status/2064661778978533571
1•marc__1•21m ago•0 comments

SpaceX valued at nearly $1.8T ahead of record share sale

https://www.bbc.com/news/articles/cwy034q89j4o
3•amclennon•24m ago•0 comments

Apple Shares List of 250 Changes Across iOS 27, macOS Golden Gate, and More

https://www.macrumors.com/2026/06/10/apple-lists-250-changes-ios-27-and-more/
3•ksec•25m ago•0 comments

OpenAI Mulls Significant Cuts to What It Charges for Tokens

https://www.wsj.com/tech/ai/openai-considers-drastic-price-cuts-anticipating-war-for-users-with-a...
1•khazit•26m ago•3 comments

Spy law (FISA) on track to lapse after Congress rejects extension

https://www.politico.com/news/2026/06/11/spy-law-on-track-to-lapse-after-house-rejects-extension-...
7•bsimpson•28m ago•1 comments

A Minimum Wage Natural Experiment Has Been Running for over a Decade

https://arindube.substack.com/p/a-minimum-wage-natural-experiment
1•bilsbie•29m ago•0 comments