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.

Show HN: Jensen Return – open-source world running on 400K lines of TypeScript

https://gamemog.com/g/jensen-return
1•rasheed106•31s ago•0 comments

Ladybird Is Now in Alpha

https://ladybird.org/posts/alpha/
1•janvdberg•41s ago•0 comments

Port Scanning for Mojang

https://sipacid.com/blog/port-scanning-for-mojang/
1•birdculture•1m ago•0 comments

Boycott Everything, Because Everyone Is Evil?

https://walsh.cl/boycott-everything-because-everyone-is-evil/
1•speckx•1m ago•0 comments

My Django on the Med 2026

https://www.paulox.net/2026/11/23/my-django-on-the-med-2026/
1•pauloxnet•2m ago•0 comments

Is Google Fitbit worth it?

1•_khameshra_•2m ago•0 comments

EasyPost (YC S13) Files for IPO

https://www.businesswire.com/news/home/20261118748771/en/EasyPost-the-Leading-Shipping-AI-and-API...
1•gsinkin•3m ago•0 comments

Show HN: Clai – AI multitool for terminal powerusers

https://www.clai.chat/
1•baalimago•3m ago•0 comments

First Claim of Artificial Super Intelligence

https://asi.anahata.uno/whitepaper.html
2•priyankadarshin•3m ago•1 comments

GPP – Build on Go with classes, generics, exceptions, and more

https://gpp.telga.in
1•todsacerdoti•3m ago•0 comments

How Apollo 11's landing would have looked from outside [video]

https://www.youtube.com/watch?v=wBjqC4SAwJ8
1•the-dude•3m ago•0 comments

Alternative solution to mTLS logout bug

https://webfrolic.com/blog-mtls-logout-ephemeral-subdomains.html
1•sandeepkd•4m ago•0 comments

Simple Sudoku Solver in Verilog

https://blog.veitheller.de/Simple_Sudoku_Solvers_SIII%2C_EIII%3A_Verilog.html
1•todsacerdoti•4m ago•0 comments

Mental Health Treatment Utilization Among Rural and Urban Older Adults in the US

https://rhrc.umn.edu/publication/mental-health-treatment-utilization-among-rural-and-urban-older-...
1•toomuchtodo•4m ago•1 comments

'The Code Is Copied Everywhere': The AI Hacking Tool Causing Havoc

https://www.404media.co/the-code-is-already-copied-everywhere-the-ai-hacking-tool-causing-havoc-a...
1•waximabbax•4m ago•0 comments

Noticing the Machines That Stand Still

https://www.chrbutler.com/noticing-the-machines-that-stand-still
3•delaugust•5m ago•0 comments

AI Goes Mainstream [pdf]

https://ai100.stanford.edu/sites/g/files/sbiybj36086/files/media/file/ai100_report_2026.pdf
1•gmays•5m ago•0 comments

I built a spa for AI agents

https://www.agentic.spa
1•pokeweb•7m ago•0 comments

Google Health is ending pairing support for older Fitbit scales on November 28

https://www.androidauthority.com/google-fitbit-aria-scales-pairing-support-3738146/
1•Brajeshwar•8m ago•0 comments

Unison Lang 2.0.0

https://github.com/unisonweb/unison/releases/tag/release/2.0.2
1•fajpunk•8m ago•0 comments

I built Slope Search to compare ski resorts by ticket price and open lifts

https://www.slopesearch.com
1•Jonnyvessal•9m ago•0 comments

Comics from Creative Computing 1985 Buyer's Guide

https://computeradsfromthepast.substack.com/p/comics-from-creative-computing-1985
1•rbanffy•9m ago•0 comments

Dreams on a Pillow: a folk tale based on the true events of the 1948 Nakba

https://store.steampowered.com/app/4438850/Dreams_on_a_Pillow/
1•0x54MUR41•10m ago•0 comments

Buckle Up the AI Bubble Is Popping

https://mathbabe.org/2026/11/23/buckle-up-the-ai-bubble-is-popping/
9•only_in_america•12m ago•3 comments

The Art of Simplifying Decisions

https://dpereira.substack.com/p/the-art-of-simplifying-decisions
1•fagnerbrack•12m ago•0 comments

Colombia files charges against Starlink over prison signals

https://www.upi.com/Top_News/World-News/2026/11/23/latam-colombia-starlink-prison-signals/5851795...
2•nephihaha•12m ago•0 comments

Detecting AI agent loops without sending raw payloads

https://agenttrafficcop.com/blog/detect-agent-loops-without-sending-raw-payloads/
1•bshafiq•13m ago•0 comments

SmartlyQ – Run your marketing and customer operations from one platform

https://smartlyq.com
1•kokorikosoeo•14m ago•0 comments

What a security leader should tell the CEO about leaked credentials

https://www.helpnetsecurity.com/2026/11/10/eric-fourrier-gitguardian-leaked-credentials/
1•mooreds•14m ago•0 comments

Detachable Fiber Connectors Pose New Challenges for Photonics

https://semiengineering.com/detachable-fiber-connectors-pose-new-challenges-for-photonics/
1•gmays•14m ago•0 comments