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

Comments

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

Why is a Fossilised Keyboard in this Pavement? [video]

https://www.youtube.com/watch?v=IxkCUi7HZfg
2•atombender•3m ago•0 comments

Meta is reportedly laying off up to 20 percent of its staff

https://www.theverge.com/business/895026/meta-laying-off-20-percent
3•jbraithwaite•4m ago•0 comments

Photographs of a Falling Cat (1894)

https://publicdomainreview.org/collection/photographs-of-a-falling-cat-1894/
2•jruohonen•5m ago•0 comments

My Thoughts on GDC 2026 – The Good, the Interesting, and the Bad (ARM, WTF)

2•swaggyteddy•5m ago•0 comments

AppsFlyer Web SDK hijacked to spread crypto-stealing JavaScript code

https://www.bleepingcomputer.com/news/security/appsflyer-web-sdk-used-to-spread-crypto-stealer-ja...
1•uyzstvqs•6m ago•0 comments

Backed by Reddit Co-Founder, Indoor Urban Farm Concept Launches Franchise Model

https://www.franchisetimes.com/franchise_news/backed-by-reddit-s-co-founder-indoor-urban-farm-con...
2•matthest•7m ago•1 comments

Wall Street Bankers Offered Lucrative Access to Join The Pentagon

https://www.nytimes.com/2026/03/13/us/politics/wall-street-access-pentagon.html
1•SilverElfin•8m ago•1 comments

Widemem: AI memory layer with importance scoring and conflict resolution

https://github.com/remete618/widemem-ai
1•eyepaqio•8m ago•1 comments

Manjaro 2.0 Manifesto

https://forum.manjaro.org/t/manjaro-2-0-manifesto/186171
2•RandomGerm4n•9m ago•0 comments

Prompt to make Claude more autonomous in web dev

3•louison11•11m ago•0 comments

Breaking the cell wall for efficient DNA delivery to diatoms

https://www.nature.com/articles/s41467-026-68562-6
2•PaulHoule•13m ago•0 comments

Ukrainian Drones to Receive Shield AI's Cutting-Edge Hivemind Autonomy System

https://militarnyi.com/en/news/ukraine-shield-ai-hivemind-autonomy-system/
2•throwoutway•14m ago•0 comments

Clawmacdo

1•kenken6477•15m ago•0 comments

Show HN: Ichinichi – One note per day, E2E encrypted, local-first

3•katspaugh•15m ago•0 comments

The Laid-Off Scientists and Lawyers Training AI to Steal Their Careers

https://nymag.com/intelligencer/article/white-collar-workers-training-ai.html
1•randycupertino•16m ago•1 comments

The RAM crisis could change the way developers make games

https://www.polygon.com/ram-crisis-gdc-2026-analysis/
2•HelloUsername•19m ago•0 comments

Claude broke a ZIP password in a smart way

4•jgrahamc•20m ago•0 comments

Ts-pattern – Pattern Matching library for TypeScript

https://github.com/gvergnaud/ts-pattern
2•h4ch1•21m ago•0 comments

Hegseth declares no quarter will be given

https://www.war.gov/News/Transcripts/Transcript/Article/4434484/secretary-of-war-pete-hegseth-and...
4•JasonADrury•25m ago•8 comments

Visualise Music Theory

1•Mimirm•25m ago•0 comments

Claude Lobo Brought the Digital Age to Ford (2023)

https://automobible.com/claude-lobo/
1•kaycebasques•25m ago•0 comments

Cascade of A.I. Fakes About War with Iran Causes Chaos Online

https://www.nytimes.com/interactive/2026/03/14/business/media/iran-disinfo-artificial-intelligenc...
3•saikatsg•27m ago•0 comments

Palantir Demos Show How the Military Could Use AI Chatbots to Generate War Plans

https://www.wired.com/story/palantir-demos-show-how-the-military-can-use-ai-chatbots-to-generate-...
6•thm•29m ago•2 comments

Why Postgres has won as the de facto database

https://www.infoworld.com/article/4144502/why-postgres-has-won-as-the-de-facto-database-today-and...
4•protik49•29m ago•0 comments

Show HN: StripeOnChain – Verify Stripe's stablecoin payments against blockchain

https://github.com/geminimir/stripeonchain
3•techdavepy•29m ago•0 comments

PiClaw 1.3.14 – Pi Day Experimental Release with Ghostty

https://github.com/rcarmo/piclaw/releases/tag/v1.3.14
1•rcarmo•29m ago•0 comments

NIS2 non-compliance, managers held liable

https://nis2directive.eu/nis2-fines/
1•jacquesm•30m ago•1 comments

Tech boss uses AI and ChatGPT to create cancer vaccine for his dying dog

https://www.theaustralian.com.au/business/technology/tech-boss-uses-ai-and-chatgpt-to-create-canc...
4•joenot443•30m ago•0 comments

Rocty

http://url:ube.com
1•scarot•33m ago•0 comments

Hostile Volume – A game about adjusting volume with intentionally bad UI

https://hostilevolume.com/
6•Velocifyer•33m ago•3 comments