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.

Einstein Probe detects an X-ray flare from nearby star

https://phys.org/news/2025-12-einstein-probe-ray-flare-nearby.html
1•wglb•1m ago•1 comments

Could OpenAI make a move on Pinterest?

https://seekingalpha.com/news/4536354-could-openai-make-a-move-on-pinterest
1•randycupertino•3m ago•1 comments

Dotnet Source Build Fails in 2026 Due To Date Overflow

https://github.com/dotnet/dotnet/issues/4037
1•csmantle•3m ago•0 comments

Year end sees record borrowing from Fed's standing repo operation

https://www.reuters.com/business/finance/banks-tap-record-liquidity-new-york-feds-standing-repo-f...
1•JumpCrisscross•8m ago•0 comments

A Basic Just-in-Time Compiler

https://nullprogram.com/blog/2015/03/19/
1•ibobev•12m ago•0 comments

Proving Liveness with TLA

https://roscidus.com/blog/blog/2026/01/01/tla-liveness/
2•ibobev•15m ago•0 comments

Apple Vision Pro production reportedly axed, marketing cut by more than 95%

https://www.pcguide.com/news/apple-vision-pro-production-reportedly-axed-despite-newer-m5-model-m...
3•ivewonyoung•15m ago•0 comments

Representing Hierarchies

https://gpfault.net/posts/first-child-next-sibling.html
1•ibobev•16m ago•0 comments

Fanimal Antitrust Lawsuit Against Ticketmaster Claims Startup Was Forced Out

https://www.ticketnews.com/2026/01/fanimal-files-antitrust-lawsuit-against-ticketmaster-claims-st...
2•hnburnsy•21m ago•0 comments

Show HN: I used AI to recreate a $4000 piece of audio hardware as a plugin

3•johnwheeler•22m ago•0 comments

2025: The Year SwiftUI Died

https://blog.jacobstechtavern.com/p/the-year-swiftui-died
1•alwillis•22m ago•0 comments

Uxn/Varvara ecosystem is a personal computing stack

https://100r.co/site/uxn.html
1•doener•26m ago•1 comments

Blaze: A Dec VT420 (and More) Emulator

https://mmastrac.github.io/blaze/
3•doener•28m ago•1 comments

Show HN: Share Claude Code and Codex CLI Transcripts

https://agentexports.com/
1•nicoritschel•29m ago•0 comments

Show HN: SpeakCamera – a surprisingly useful iPhone Shortcut to read text aloud

https://speakmycamera.org/
1•wdpatti•31m ago•0 comments

Google AI Overviews put people at risk of harm with misleading health advice

https://www.theguardian.com/technology/2026/jan/02/google-ai-overviews-risk-harm-misleading-healt...
8•sandebert•37m ago•0 comments

2026 will be the year of on-device agents

1•mycelial_ali•37m ago•0 comments

Looking for Alice

https://www.henrikkarlsson.xyz/p/looking-for-alice
1•noleary•40m ago•0 comments

JMW Turner, more a Buffett than a Jane Street intern

https://www.ft.com/content/e306db7b-7403-4c99-b557-48b42a9eba51
1•hhs•41m ago•0 comments

Albert Einstein's Brilliant Politics

https://www.theatlantic.com/culture/2026/01/albert-einstein-optimistic-politics/685458/
1•fortran77•41m ago•1 comments

Erdos problems solved more or less autonomously by AI

https://mathstodon.xyz/@tao/115788262274999408
1•gmays•42m ago•0 comments

Where AI is headed in 2026

https://foundationcapital.com/where-ai-is-headed-in-2026/
2•gmays•43m ago•0 comments

System Falsification for Efficient Cyber-Kinetic Vulnerability Detection

https://arxiv.org/abs/2511.16765
1•PaulHoule•43m ago•0 comments

New reporting rules end crypto’s tax secrecy era

https://www.pymnts.com/cryptocurrency/2026/new-reporting-rules-end-cryptos-tax-secrecy-era/
2•hhs•45m ago•0 comments

Show HN: Browser in C and Lua for the Playdate Console

https://github.com/remysucre/ORBIT
1•remywang•45m ago•0 comments

NumPy Enhancement Proposal 21: Simplified and explicit advanced indexing

https://numpy.org/neps/nep-0021-advanced-indexing.html
2•dynm•46m ago•0 comments

Life and Death at the County Fair

https://bittersoutherner.com/issue-no-12/life-and-death-at-the-county-fair
2•noleary•46m ago•0 comments

Codex Front end Skill: Unique Designs within one shot

https://github.com/vipulgupta2048/codex-skills
1•vipulgupta2048_•51m ago•1 comments

Grok Blames 'Lapses in Safeguards' After AI Chatbot Posts Sexual Images of Kids

https://www.forbes.com/sites/tylerroush/2026/01/02/grok-blames-lapses-in-safeguards-after-ai-chat...
2•randycupertino•52m ago•2 comments

AI Maestro Agent Orchestration

https://github.com/23blocks-OS/ai-maestro
2•RyanShook•54m ago•1 comments