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

Comments

zoezoezoezoe•9mo 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•9mo 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.

From Roots to Reach: Network Resilience in Natural Disasters

https://blog.apnic.net/2026/02/06/from-roots-to-reach-network-resilience-in-natural-disasters/
1•jruohonen•56s ago•0 comments

Gokin: Go-Native CLI for AI-Assisted Coding with Gemini, DeepSeek, GLM, Ollama

https://github.com/ginkida/gokin
1•ginkida•1m ago•1 comments

Macau's Grand Emperor hotel rips up lobby floor to sell off gold bricks

https://www.theguardian.com/world/2026/feb/06/macau-grand-emperor-hotel-lobby-gold-bricks
1•c420•1m ago•0 comments

I used Gemini to build an all-in-one Chrome extension, and uninstalled 10 others

https://chromewebstore.google.com/detail/fireai-all-in-one-ai-assi/jgpmkbgjngmhibgebdbekognpdoagoag
1•icefunc•2m ago•0 comments

Is C-rating marketing, or does it still matter for LiPo packs?

1•nicole_chen•3m ago•1 comments

Show HN: TurboLibBMP 0.1.1 – single-header BMP in C (no allocations, embedded)

1•DenisDolya•5m ago•0 comments

Serenity Prayer

https://en.wikipedia.org/wiki/Serenity_Prayer
1•baxtr•5m ago•0 comments

Jeffrey Epstein Interview [video]

https://www.youtube.com/watch?v=oIEYmflX090
1•max_•6m ago•0 comments

SQLite in Production? Not So Fast for Complex Queries – Yyhh.org

https://yyhh.org/blog/2026/01/sqlite-in-production-not-so-fast-for-complex-queries/
1•Onavo•24m ago•0 comments

'My Father's Shadow' is an ode to memory and loss, blazing Nigerian film trails

https://www.cnn.com/style/my-fathers-shadow-film-nigerian-cinema-spc
1•keepamovin•25m ago•0 comments

Show HN: Dadaxiaoren – A digital"shoe-slapping"stress relief tool on HK sorcery

https://dadaxiaoren.com
2•xiyi•26m ago•2 comments

Engineers turned a former Tube train into a battery powered prototype

https://www.ianvisits.co.uk/articles/how-engineers-turned-a-former-tube-train-into-a-battery-powe...
1•edward•28m ago•0 comments

Z-Image AI

https://z-image.vip
1•Evan233•30m ago•2 comments

What even is an 'AI growth zone', anyway?

https://takes.jamesomalley.co.uk/p/ai-growth-zones
1•edward•33m ago•0 comments

Gemini CLI v0.27.0

https://twitter.com/geminicli/status/2019467495376089124
1•tosh•35m ago•0 comments

OpenSSH Post-Quantum Cryptography

https://www.openssh.org/pq.html
1•Yularar•35m ago•0 comments

TimeCop – Scrub through commits like a video timeline

https://github.com/kamilmac/timecop
1•kmacinski•37m ago•1 comments

Amazon Stock Falls Sharply on Earnings. Spending Continues to Soar

https://www.barrons.com/articles/amazon-earnings-stock-price-9455b478
2•petethomas•38m ago•0 comments

GPT-5 lowers the cost of cell-free protein synthesis

https://openai.com/index/gpt-5-lowers-protein-synthesis-cost/
1•admp•39m ago•0 comments

Possibility of US selling Australia nuclear submarines is increasingly remote

https://www.theguardian.com/world/2026/feb/05/aukus-nuclear-submarine-deal-us-australia
3•neamar•42m ago•0 comments

Claude Opus 4.6 on ARC-AGI

https://twitter.com/arcprize/status/2019483337400938580/photo/1
1•tosh•44m ago•0 comments

Shifting Left of CI

https://tuananh.net/2026/02/05/shifting-left-of-ci/
1•tuananh•45m ago•0 comments

OpenAI requires ID verification for cybersecurity related tasks

https://openai.com/index/trusted-access-for-cyber/
3•VortexLain•45m ago•0 comments

Thirteen Constants from Zero Free Parameters? What Did I Find?

https://quantummarmelade.substack.com/p/thirteen-constants-from-zero-free
1•obius_prime•46m ago•1 comments

Ask HN: Rust Crates Safety

1•throwaway2027•49m ago•0 comments

Show HN: Agent-smith – Auto-generate AGENTS.md for AI coding assistants

https://github.com/jpoindexter/agentsmith
1•micronink•49m ago•0 comments

The Mystery of the Mole Playing Rough [video]

https://www.youtube.com/watch?v=nwQmwT1ULMU
1•archagon•51m ago•0 comments

Privacy Pass: upgrading to the latest protocol version (2024)

https://blog.cloudflare.com/privacy-pass-standard/
2•walterbell•53m ago•0 comments

Pakistan to test students real-world skills before they graduate from IT degrees

https://www.theregister.com/2026/02/06/pakistan_it_national_skill_competency_test/
2•defrost•53m ago•0 comments

AI Development Company

1•sonniya•54m ago•0 comments