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•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.

Zig: Build System Reworked

https://ziglang.org/devlog/2026/#2026-05-26
1•roflcopter69•1m ago•0 comments

GlassWorm Developer Supply-Chain Botnet Takedown

https://haltingproblems.com/analysis/glassworm-developer-supply-chain-botnet/
1•s4mw1se•1m ago•1 comments

Has pancreatic cancer met its match?

https://worksinprogress.co/issue/the-slippery-protein-problem/
1•surprisetalk•2m ago•0 comments

Why Are so Many Babies Born around 8:00 A.M.? (2017)

https://www.scientificamerican.com/blog/sa-visual/why-are-so-many-babies-born-around-8-00-a-m/
1•helsinkiandrew•3m ago•0 comments

Nuclear Power Startup Newcleo to Go Public in SPAC Deal

https://www.wsj.com/business/energy-oil/nuclear-power-startup-newcleo-to-go-public-in-spac-deal-f...
1•simonebrunozzi•4m ago•1 comments

Utopia: Fluid Responsive Design

https://utopia.fyi/
1•eustoria•5m ago•0 comments

Placebo Jobs (and five stages of labor)

https://twitter.com/notevenwrongg/status/2059622561785250141
1•georgestrakhov•5m ago•0 comments

Avoid Hasty Caching

https://www.jakeworth.com/posts/avoid-hasty-caching/
1•jwworth•7m ago•0 comments

Nostr VPN: VPN without accounts

https://nostrvpn.org/
1•eustoria•8m ago•0 comments

Show HN: GitShare – Turn GitHub repos into beautiful social media screenshots

https://gitshare.ch/
1•dimiprasakis•9m ago•0 comments

Many portions of Magnifica Humanitas appear to be AI-written

https://www.lesswrong.com/posts/GbWwesBnetyiomxEH/many-portions-of-magnifica-humanitas-appear-to-...
1•dev_hugepages•10m ago•0 comments

Cramér-Rao Bound

https://en.wikipedia.org/wiki/Cram%C3%A9r%E2%80%93Rao_bound
1•hasley•10m ago•1 comments

Steam and valve lost controle about cs2

https://pdfearn.blogspot.com/2026/05/get-100-approved-adsense-unsaturable.html
1•iLzKiiSG•10m ago•0 comments

Latency Numbers Every Programmer Should Know (2026)

https://gist.github.com/jboner/2841832
1•andromaton•12m ago•1 comments

Show HN: Game Boy pixel pipeline explorer

https://pixelpipeline.xyz
2•blueblazin•13m ago•0 comments

Chaoss Metrics in 2026

https://nesbitt.io/2026/05/27/chaoss-metrics-in-2026.html
1•jamietanna•13m ago•0 comments

Athletes at the Enhanced Games were bigger, but not better

https://www.theatlantic.com/culture/2026/05/enhanced-games-sports-doping/687296/
2•FinnLobsien•13m ago•0 comments

TheWire13 is a TCP/IP stack for classic Amiga systems running AmigaOS 1.3

https://aminet.net/package/comm/tcp/TheWire13
1•doener•13m ago•0 comments

UFC arena under construction on White House lawn

https://www.npr.org/2025/09/08/nx-s1-5526066/leni-riefenstahl-nazi-filmmaker-new-documentary
3•KnuthIsGod•15m ago•0 comments

Deep Habits: WorkingMemory.txt

https://calnewport.com/deep-habits-workingmemory-txt-the-most-important-productivity-tool-youve-n...
1•piinbinary•15m ago•0 comments

How to build a lunar mass driver

https://caseyhandmer.wordpress.com/2026/05/08/how-to-build-a-lunar-mass-driver/
1•surprisetalk•17m ago•0 comments

Go errors are a story, most teams lose the plot

https://robinsiep.com/blog/posts/go-errors/
1•seeb•17m ago•0 comments

GitHub Incident Again

https://www.githubstatus.com/?now
1•robeym•17m ago•2 comments

LiteSpeed CPanel Plugin with Root Privilege Escalation Under Active Exploitation

https://haltingproblems.com/analysis/litespeed-cpanel-plugin-cve-2026-48172/
2•s4mw1se•21m ago•0 comments

Pushover: Simple Notifications for Android, iPhone, iPad, and Desktop

https://pushover.net/
1•janandonly•21m ago•0 comments

AI is not the answer to AI-enabled fraud

https://www.codastory.com/oligarchy/ai-is-not-the-answer-to-ai-enabled-fraud/
1•cdrnsf•22m ago•0 comments

Show HN: Map drawing tool where the map lives in the URL

https://drawonamap.com/
4•singiamtel•23m ago•0 comments

Revenge of the Business Idiot

https://www.wheresyoured.at/the-revenge-of-the-business-idiot/
2•frizlab•23m ago•0 comments

Tiny GPT in Go. Optimised for Understanding. Trained on Jules Verne Books

https://github.com/zakirullin/gpt-go
2•asdfjsjj2342•25m ago•0 comments

Intranasal Human EVs Restrain Inflammatory Transcriptome in Aged Hippocampus

https://isevjournals.onlinelibrary.wiley.com/doi/10.1002/jev2.70232
3•bookofjoe•26m ago•0 comments