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.

Android 17's AVF Debian Linux Terminal now has official theme packs

https://terminalcolors.com/
1•sans_souse•28s ago•0 comments

Sqlite3 WebAssembly

https://sqlite.org/wasm/doc/trunk/index.md
2•arun-mani-j•4m ago•0 comments

Show HN: Tokken – a browser fighting game where AI models fight and HP is tokens

https://tokken.win/
1•lexdoudkin•6m ago•0 comments

Toolpak – Flatpak for System Tools

https://blogs.gnome.org/alatiera/2026/09/26/introducing-toolpak/
1•amlib•7m ago•0 comments

AWS CloudWatch Omni AI

https://aws.amazon.com/blogs/aws/introducing-amazon-cloudwatch-omni-collaborative-ai-powered-obse...
1•based2•7m ago•0 comments

Six Bazel patches from an AI software factory, plus a remote-cache security bug

https://www.incredibuild.com/blog/bazel-contributions-security-fix-autonomous-sdlc
1•lol-lol-lol-2•8m ago•0 comments

Amazon Is Recruiting Laid Off Workers in Boomerang Hire Trend

https://www.inc.com/dan-schawbel/amazon-30000-laid-off-recruiting/91410673
2•frank_clover•10m ago•0 comments

Enhanced Spell Checking on the Web

https://bkardell.com/blog/EnhancedSpellchecking.html
1•based2•11m ago•0 comments

An Existential Guide To: Forgiving Your Parents

https://theshadowedarchive.substack.com/p/an-existential-guide-to-forgiving
1•jger15•13m ago•0 comments

Rumps – Uncomplicated macOS Python Statusbar Apps

https://github.com/jaredks/rumps
2•gregsadetsky•13m ago•0 comments

Japan moves to tighten rules for foreigners, throwing futures into doubt

https://www.aljazeera.com/economy/2026/9/25/japan-moves-to-tighten-rules-for-foreigners-throwing-...
5•mikhael•14m ago•0 comments

The state of SIMD in Rust in 2026

https://shnatsel.github.io/state-of-simd-rust-2026/
1•fanf2•15m ago•0 comments

Show HN: A local alternative to Jev – 94% on Banking77

https://gist.github.com/nicobrenner/056a5aaff5d0119c0032ecdad5029557
2•nico•15m ago•0 comments

1986: How to Spot the Upper Class – That's Life – BBC Archive [video]

https://www.youtube.com/watch?v=eK6w6MzMDhk
1•joebig•15m ago•0 comments

Modern LLMs have tiny GPTs hidden inside them

https://invertedpassion.substack.com/p/modern-llms-have-tiny-gpts-hidden
1•giuliomagnifico•19m ago•0 comments

Von, an Open-Source Jev Alternative

https://github.com/wfzyx/von
2•k__•19m ago•0 comments

Sealed Fedora Atomic Desktop bootable container images

https://fedoramagazine.org/sealed-atomic-desktops-test-images/
2•anon109•20m ago•0 comments

Show HN: Museum of Numbers

https://numbermuseum.com/2147483647
3•rhl314•20m ago•2 comments

Brave browser: [ads] Add "Sponsored ads enabled" toggle to settings on Desktop

https://github.com/brave/brave-browser/issues/58786
1•thunderbong•25m ago•0 comments

WLED – open-source ESP32 webserver to control NeoPixel LEDs

https://kno.wled.ge/
1•gregsadetsky•28m ago•0 comments

Reverse-engineering the Intel 8087's tangent algorithm: more than CORDIC

https://www.righto.com/2026/09/8087-tangent-cordic.html
2•pwg•30m ago•1 comments

Wrong, Not Broken

https://aws.amazon.com/blogs/aws-insights/wrong-not-broken/
1•gslin•32m ago•0 comments

Labelled 'pervert glasses': Will Meta's camera-free version change their image?

https://www.bbc.co.uk/news/articles/cwp80l0my1x2o
1•ColinWright•32m ago•0 comments

Docker launches cloud sandboxes: Start on your laptop, finish in the cloud

https://www.docker.com/blog/introducing-cloud-sandboxes-start-on-your-laptop-finish-in-the-cloud/
1•NarratorTD•33m ago•0 comments

What is the best shape of a city? Modelling effect of urban form on distance

https://journals.sagepub.com/doi/10.1177/23998083261458842
1•rustoo•34m ago•0 comments

The clans that run Spain's biggest companies

https://english.elpais.com/economy-and-business/2026-09-21/from-opus-dei-alumni-to-mckinsey-consu...
1•momentmaker•35m ago•0 comments

The Plunging Price of Thought

https://epoch.ai/publications/the-plunging-price-of-thought
1•momentmaker•35m ago•1 comments

Show HK: Find My Cat Name

https://findmycatname.com/
1•giraldomac•36m ago•0 comments

Washington Heights Man Cleans One NYC Block a Day for 100 Days,Neighbors Join In

https://hoodline.com/2026/09/washington-heights-man-cleans-one-nyc-block-a-day-for-100-days-neigh...
4•thunderbong•36m ago•0 comments

I Put My LG TV Under Network Surveillance [video]

https://www.youtube.com/watch?v=Sg9tUEk1c7A
1•pier25•37m ago•0 comments