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

Comments

zoezoezoezoe•7mo 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•7mo 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: Copy-ip.com – Go to copy your public IP to clipboard

https://copy-ip.com/
1•mengchengfeng•53s ago•0 comments

Like Ruby on Rails, but for Rust

https://loco.rs
1•kristianpaul•1m ago•0 comments

The Gap for LLMs Isn't Benchmarks – It's Everyday Value

https://github.com/xxia8864/Article/blob/main/Docs/LLM%20Business%20direction.md
1•bill3389•1m ago•0 comments

Meta to cut up to 30% of metaverse budget

https://www.reuters.com/business/meta-ceo-zuckerberg-plans-deep-cuts-metaverse-efforts-bloomberg-...
1•JumpCrisscross•3m ago•0 comments

GPT 5.1 research thinks it's 2024 so ignoring search results mentioning 2025

https://twitter.com/makeavish11/status/1996609547113538039
3•makeavish•3m ago•0 comments

Sharded repodata in conda (beta): an order of magnitude faster fetching

https://conda.org/blog/sharded-repodata-improvements/
1•Yeaw•4m ago•0 comments

Exploiting a DoS in GraphQL: A Simple Query That Took Down the System

https://r00tbee.medium.com/exploiting-a-dos-in-graphql-a-simple-query-that-took-down-the-system-5...
1•jgalt212•4m ago•0 comments

Influence of Control Strategy on Unmanned Aerial Vehicles Energy Consumption

https://www.mdpi.com/1996-1073/18/22/5998
2•PaulHoule•6m ago•0 comments

Speeding Up Hash Tables

https://cacm.acm.org/news/speeding-up-hash-tables/
1•bikenaga•6m ago•0 comments

Crypto is impacted by calendar events. We have figured out a pattern

https://crustai.io
1•AdamMyers17•7m ago•1 comments

What I Wish I Could Tell Every Engineer Joining a New Team

https://qckfx.com/blog/what-i-wish-i-could-tell-every-engineer-joining-a-new-team
1•chw9e•8m ago•0 comments

How to Checkpoint

https://blog.conductor.build/checkpointing/
1•Charlieholtz•8m ago•0 comments

Relational AI System That Remembers Hours of Context

1•buttersmoothAI•10m ago•0 comments

Show HN: Heat Cue – Multilingual, LLM-powered reverse dictionary game

https://heatcue.com/
1•saretup•11m ago•0 comments

Kodezi Chronos-1 - LLM specialized in code debugging

https://chronos.so/
1•ishraqkhan•11m ago•0 comments

The Depopulation Trade: An Unruly Thesis

https://blog.unrulycap.com/the-depopulation-trade-an-unruly-thesis/
2•mcc1ane•12m ago•1 comments

China's chip champions miss their DRAM cue

https://www.reuters.com/commentary/breakingviews/chinas-chip-champions-miss-their-cue-2025-12-02/
3•walterbell•12m ago•0 comments

FDEs were why I invested in Palantir in 2022 (and sold it all in 2024)

https://ossa-ma.github.io/blog/pltr-fdes
4•ossa-ma•14m ago•2 comments

Pharvaris' pill succeeds in late-stage trial for rare swelling disorder

https://www.biopharmadive.com/news/pharvaris-pill-succeeds-in-late-stage-trial-for-rare-swelling-...
1•andsoitis•14m ago•0 comments

Feynman vs. Computer

https://entropicthoughts.com/feynman-vs-computer
1•cgdl•14m ago•0 comments

Capsule: Fine-grained isolation for multi-agent systems using WASM

https://capsuleruntime.substack.com/p/fine-grained-isolation
1•mavdol04•17m ago•1 comments

Bootloader Unlock Wall of Shame

https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame
3•thunderbong•20m ago•0 comments

Reality Exists Without Observers? Boooo

https://nautil.us/reality-exists-without-observers-boooo-1252289/
2•dnetesn•20m ago•0 comments

iPhone Air's Resale Value Has Dropped Dramatically, Data Shows

https://www.macrumors.com/2025/12/04/iphone-air-resale-value-has-dropped-dramatically/
3•tosh•21m ago•0 comments

Hunting a production-only proxy bug in SvelteKit

https://drew.silcock.dev/blog/fixing-a-bug-in-sveltekit/
1•drewsberry•21m ago•0 comments

Rust: Proof of Concept, Not Replacement

https://files.neoon.com/rust-game-over-203X.html
3•sho_hn•22m ago•0 comments

Consumers are spending $22 more a month on average for streaming services

https://www.latimes.com/entertainment-arts/business/story/2025-11-21/why-do-streaming-prices-keep...
3•speckx•22m ago•2 comments

How Does the CIA Make People Disappear? CIA Spy Reveals – LADbible Stories [video]

https://www.youtube.com/watch?v=BXtDH2IXKY8
4•keepamovin•23m ago•0 comments

Show HN: AI Loft – Sora 2, Nano Banana 2, Flux in One Creative Platform

https://ailoft.net
1•songtianlun1•24m ago•0 comments

DeepFabric. Train and Evaluate Model Behavior with Structured Data

https://huggingface.co/blog/lukehinds/deepfabric-training-model-behavior
1•decodebytes•24m ago•0 comments