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.

Could this be Microsoft's moment?

https://sjg.io/writing/could-this-finally-be-microsofts-moment/
1•simonjgreen•2m ago•0 comments

Memory-Safe WebP Decoding

https://halide.cx/blog/wpd/
2•computerbuster•3m ago•1 comments

Working the Roofline for DeepSeek-V3 on Hopper

https://deepseek-v3.ezyang.com/studies/03-roofline.html
1•matt_d•5m ago•0 comments

Faster Local LLMs with iPhone Offloading

https://github.com/StayLameBro/backburner
1•oezi•8m ago•1 comments

Used Processor Leads to Game Ban

https://hardware.slashdot.org/story/26/10/02/1750242/used-processor-leads-to-game-ban
2•gbil•15m ago•1 comments

IINA (the media player) 1.5.0 is Released

https://iina.io/blog/150-release/
1•uonr•16m ago•0 comments

Haunted by the Ghosts of Materialism

https://blog.coredump.cx/p/haunted-by-the-ghosts-of-materialism
2•surprisetalk•18m ago•0 comments

Show HN: Rowan, an open-source SAST scanner for AI apps (code, models, MCP)"

https://github.com/hedgerow-dev/rowan
1•hedgerow-dev•19m ago•0 comments

DataInventor – an open-source replication of Adaption Lab's Invent a Dataset

https://huggingface.co/spaces/LocalLLaMA/data-inventor
1•codelion•21m ago•0 comments

LiberNT – fork of ReactOS focused on ARM64 and Windows 11

https://libernt.com
1•masijo•23m ago•0 comments

How good are we at spotting AI images?

https://slop-sense.labtoagi.com/
2•hckr78•27m ago•2 comments

Will America Spend 9% of Its GDP on AI? The Industry Is Counting on It

https://www.wsj.com/tech/ai/will-america-spend-9-of-its-gdp-on-ai-the-industry-is-counting-on-it-...
3•geox•31m ago•1 comments

Geocities 1996/97 – the good old days

https://claude.ai/artifact/ASgJADXmxzvXCQa47KaKzH
1•hrbrt•36m ago•1 comments

What did Google do to its Linux terminal on Pixel phones

2•Steaglsz•39m ago•0 comments

Agentic broker for archived data and coding logs

https://data-sales-broker.app/
1•measurablefunc•40m ago•0 comments

ScholarCatalyst: A Benchmark for Retrieving Papers That Inspire New Research

https://ohmyksh.github.io/project/ScholarCatalyst/
1•matt_d•45m ago•0 comments

Legal sector outpaced US jobs growth in September

https://www.reuters.com/legal/litigation/legal-sector-outpaced-us-jobs-growth-september-2026-10-02/
1•1vuio0pswjnm7•46m ago•0 comments

Katalyst Concludes Link Mission, Advances Future Robotic Space Operations

https://www.katalystspace.com/news/katalyst-concludes-link-mission-advances-future-robotic-space-...
1•taubek•47m ago•0 comments

How A Boeing 737 MAX Survived a Nosedive Traveling at the Speed of Sound

https://www.wsj.com/business/airlines/how-a-boeing-737-max-survived-a-nosedive-traveling-at-the-s...
1•thm•51m ago•0 comments

Pillage First Ask question later

https://pillagefirst.com/
1•ssummoner001•53m ago•0 comments

An Update on Orion for Linux and Windows

https://blog.kagi.com/update-orion-linux-windows
3•pentagrama•54m ago•0 comments

People will be AI's app layer

https://twitter.com/koopuluri/status/2106244337814364332
2•koopuluri•1h ago•3 comments

Where AI learns to do real work

https://labelbox.com/
2•measurablefunc•1h ago•0 comments

Cua Spaces

https://spaces.cua.ai/
2•handfuloflight•1h ago•0 comments

Show HN: Copy and Find Symbols

https://symbolsymbol.com/
1•artiomartiom•1h ago•0 comments

We Can't Let My Former Venture Capital Colleagues Buy Off Our Democracy(NYTimes)

https://www.nytimes.com/2026/06/11/opinion/silicon-valley-ai-politics.html
5•ajoy•1h ago•0 comments

A denser layout for the Claude desktop app, 2-column sidebar and project colours

https://github.com/mohannad789/claude-desktop-skin
2•mohannad7•1h ago•0 comments

Show HN: Offline NHTSA VIN decoder, verified against NHTSA's own SQL

https://github.com/AIKitLLC/nhtsa-edge-api
2•tuannx•1h ago•0 comments

Windows on Itanium also provided for hot-patching, in an even simpler way

https://devblogs.microsoft.com/oldnewthing/20261001-57/?p=112747/
3•zdw•1h ago•0 comments

Stable Matching Problem

https://en.wikipedia.org/wiki/Stable_matching_problem
1•azhenley•1h ago•0 comments