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.

Formatting as Courtesy to the Reader

https://tracydurnell.com/2026/08/31/formatting-as-courtesy-to-the-reader/
1•serhack_•1m ago•0 comments

Introduction to the NT kernel development (Part 1)

https://geob99.github.io/pages/nt-dev/nt-dev-part1.html
1•serhack_•1m ago•0 comments

Americans Still Skeptical That UFOs Are Aliens

https://news.gallup.com/poll/713765/americans-skeptical-ufos-aliens.aspx
1•helsinkiandrew•2m ago•0 comments

The Meaning of Liff

https://en.wikipedia.org/wiki/The_Meaning_of_Liff
1•Bluestein•3m ago•0 comments

AI Orchestrator that self-learns, run's teams and never sleeps

https://crewmoot.hellodexter.com/
1•dalekirkwood•4m ago•1 comments

Verba: Learn a language by talking to an AI never touches the internet

https://github.com/nuvocode/verba
1•timeoperator•4m ago•0 comments

Inside Colombia's Cocaine Factories

https://www.economist.com/interactive/1843/2026/08/28/inside-colombias-cocaine-factories
1•bookofjoe•4m ago•1 comments

Shein is a global slavery company masquerading as an e-commerce platform

https://en.wikipedia.org/wiki/Shein
2•matheusalmeida•9m ago•0 comments

Show HN: I built a live stream site where every spot is instantly AI-generated

https://videoai.me/live
2•Paul_Grsl•9m ago•0 comments

DuckDB Runs Recursive CTEs Faster

https://duckdb.org/2026/08/25/how-duckdb-runs-recursive-ctes-faster
2•boshomi•13m ago•0 comments

Nix Is Right. Its Cost Is Not

https://nrd.sh/blog/store-was-never-the-point.html
1•ssernikk•13m ago•0 comments

Raindrops are tiny lightning bolts, and they're corroding cars, study finds

https://arstechnica.com/science/2026/08/raindrops-are-tiny-lightning-bolts-and-theyre-corroding-c...
1•Archelaos•16m ago•0 comments

Initial USB4/Thunderbolt Support for Apple M1/M2/M3 SoCs

https://lkml.iu.edu/2608.3/12164.html
1•metrofun•17m ago•0 comments

Why the Way We Append Data to LLM Is Killing Our Cache and Model Attention

https://github.com/orbsh/wiki/blob/main/tail-prompt-optimization-en.md
1•orbsh•19m ago•0 comments

Claude, Codex, and Hermes installed unowned code inside corporate networks

https://arstechnica.com/security/2026/08/claude-codex-and-hermes-installed-unowned-code-inside-co...
1•nreece•23m ago•0 comments

I Tried Every AI Browser, Then Went Back to Safari

https://medium.com/@patricecunliffe/i-tried-every-ai-browser-then-went-back-to-safari-b43ccdeff7a5
2•syumei•24m ago•0 comments

Solaris

https://runway.com/news/research/introducing-solaris
1•o4c•25m ago•0 comments

Londoners Are Stewing over Supercar Tourists Who Park Wherever They Want

https://www.wsj.com/world/uk/london-middle-east-luxury-cars-parking-tickets-b1fb0f0c
2•JumpCrisscross•28m ago•0 comments

But where does taste come from?

https://dustycloud.org/blog/but-where-does-taste-come-from/
1•birdculture•28m ago•0 comments

FakeLinux: Run unmodified Linux binaries on macOS

https://github.com/ayourtch-llm/fakelinux
1•AbuAssar•30m ago•0 comments

Satellite connectivity on a €400 open-source industrial datalogger

https://docs.isurlog.isurki.com/blog/2026/08/31/ntn-on-the-nrf9151-low-cost-satellite-iot-without...
1•tecnica•33m ago•0 comments

AnkiDroid: Google Play no longer allowing Open Collective donation link

https://github.com/ankidroid/Anki-Android/issues/21656
40•hexa555•34m ago•1 comments

Anthropic Signs $35B Cloud Deal Backed by Nvidia

https://www.wsj.com/tech/ai/anthropic-signs-35-billion-cloud-deal-backed-by-nvidia-f12622f1
1•JumpCrisscross•35m ago•0 comments

Computer use on GNOME Wayland, on a second desktop you never see (for Agents)

https://github.com/tristanmuzzu/deskwright
1•curious_human37•38m ago•0 comments

Chinese reasoning models match the best on 4 of 5 benchmarks at 40x lower cost

https://reports.ag-insights.co.uk/state-of-ai-reasoning/
1•moralec•38m ago•1 comments

It was billed as effortless London luxury. Then tenants found out the rules

https://www.ft.com/content/e9b9a8fa-bbce-44a0-adc4-c1f1cc9f2113
1•JumpCrisscross•43m ago•0 comments

Bringing Package Management to Swift's C++ Interoperability

https://blog.conan.io/cpp/conan/swift/macos/xcode/2026/09/01/Swift-Cpp-Interop-With-Conan-Managed...
1•czoido•43m ago•0 comments

Show HN: Turn your face into an ASCII type

https://www.pixelstech.net/application/ascii-portrait/
2•misonic•43m ago•0 comments

Abliterated model large v2: GLM 5.3 84.5% CyberGym

https://abliteration.ai/blog/introducing-abliterated-model-large-v2
1•gafferongames•43m ago•0 comments

Roman Science

https://science.nasa.gov/mission/roman-space-telescope/science/
2•andsoitis•49m ago•0 comments