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

Comments

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

We Put Claude Code in Rollercoaster Tycoon

https://labs.ramp.com/rct
1•iamwil•1m ago•0 comments

Show HN: Dev visibility for founders who don't code

1•slmslm22•2m ago•0 comments

Brain: The First Computer Virus

https://medium.com/geekculture/brain-the-worlds-first-computer-virus-f3758323d894
1•andsoitis•3m ago•0 comments

Online Play Game Boy Advance Mother 3 (Eng. Translation)

https://www.retrogames.cc/gameboyadvance-games/mother-3-eng.html
1•HiPHInch•4m ago•0 comments

The First PC Virus

https://www.bbc.com/audio/play/w3ct7479
1•andsoitis•5m ago•0 comments

Show HN: Mullion – type-safe LLM context management for TypeScript

https://github.com/mullionlabs/mullion-ts
2•mullion•6m ago•0 comments

Will Smith helped discover new species of anaconda

https://arstechnica.com/science/2026/01/that-time-will-smith-helped-discover-new-species-of-anaco...
2•homo_economicus•6m ago•0 comments

Show HN: Agent-of-empires: opencode and claudecode session manager

https://github.com/njbrake/agent-of-empires
2•river_otter•6m ago•0 comments

Show HN: words.zip – Massively infinite word search

https://words.zip/
2•yathern•7m ago•0 comments

Datafun – functional language that generalizes Datalog

https://www.rntz.net/datafun/
2•PaulHoule•7m ago•0 comments

US Authoritarian Regime Executes Unarmed Civilian as Ruler Grows More Erratic

https://zeteo.com/p/trump-us-regime-executes-civilian-isolated
3•xbmcuser•8m ago•0 comments

Show HN: A minimal wrapper for stable FastAPI WebSockets

https://github.com/yuuichieguchi/capsule-rsc
1•yuu1ch13•8m ago•0 comments

Show HN: Will be the best unit conversion site on the planet

https://mrunit.net
1•thenodeshift•10m ago•0 comments

LLVM: The Bad Parts

https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html
2•vitaut•11m ago•0 comments

North America's Elevator Problem [video]

https://www.youtube.com/watch?v=Or1_qVdekYM
1•Klaster_1•11m ago•0 comments

Are You Dead?

https://twitter.com/tongbingxue/status/2010631573251690622
1•harscoat•14m ago•0 comments

I built an interactive SHA-256 visualizer

https://github.com/bitcoin-dev-project/hashes-visualizer
1•jrakibi•14m ago•0 comments

UN chief 'shocked' by reports of excessive force against protesters in Iran

https://www.ungeneva.org/en/news-media/news/2026/01/114716/un-chief-shocked-reports-excessive-for...
2•mhb•15m ago•0 comments

Meta taps Dina Powell McCormick as president and vice chairman

https://www.axios.com/2026/01/12/meta-dina-powell-mccormick-president-vice-chairman
2•aaronarduino•17m ago•0 comments

Onion Futures Act

https://en.wikipedia.org/wiki/Onion_Futures_Act
2•r0f1•20m ago•0 comments

How to Make a Damn Website

https://lmnt.me/blog/how-to-make-a-damn-website.html
1•todsacerdoti•21m ago•1 comments

Ask HN: Job seekers, what's working / not working?

4•Jabbs•22m ago•2 comments

Smart Glasses Would Adjust Focus on the Fly Based on Your Eye Movements

https://www.cnet.com/health/personal-care/ixi-eyewear-smart-glasses-autofocus-lenses/
1•smurda•23m ago•0 comments

Show HN: I built Lexica, a bot that texts you a Word-of-the-Day every morning

https://lexica.io
1•sestarkman•25m ago•0 comments

Claude Shannon's randomness-guessing machine

https://www.loper-os.org/bad-at-entropy/manmach.html
1•Kotlopou•25m ago•0 comments

The news media blew it again: iOS 26 adoption measured only third-party browsers

https://lapcatsoftware.com/articles/2026/1/3.html
2•frizlab•26m ago•0 comments

Traditional NLP is not dead

https://alex-jacobs.com/posts/beatingbert/
1•tacoooooooo•26m ago•0 comments

Progressive Disclosure of Agent Tools from the Perspective of CLI Tool Style

https://github.com/musistudio/claude-code-router/blob/main/blog/en/progressive-disclosure-of-agen...
1•musistudio•27m ago•1 comments

Show HN: I got tired of "Reliability Spaghetti," so I monkeypatched PydanticAI

1•steer_dev•29m ago•0 comments

Cue Does It All, but Can It Literate?

https://xlii.space/cue/cue-does-it-all-but-can-it-literate/
2•xlii•29m ago•0 comments