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

Comments

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

Have Fungi Hacked Us?

https://thesporereport.com/?p=884
2•stared•2m ago•0 comments

Cell-inspired sensor paves way to real-time health

https://www.latrobe.edu.au/news/articles/2026/release/cell-inspired-sensor-paves-way-to-real-time...
2•giuliomagnifico•2m ago•0 comments

Reverse Engineering Life and Reality

https://mimetra.com/blog/understanding-of-reality/
1•mw67•4m ago•1 comments

I collected 1k cancellation URLs and built them into an iOS app

https://apps.apple.com/us/app/subscriptioncat-reminder/id6760429188
1•hiroshichan•6m ago•0 comments

No semicolons needed: a survey of programming language syntaxes

https://terts.dev/blog/no-semicolons-needed/#lua
1•fanf2•7m ago•0 comments

Cursor Composer 2 is just Kimi K2.5 with RL

https://twitter.com/fynnso/status/2034706304875602030
2•mirzap•8m ago•0 comments

The Soul of a Pedicab Driver

https://www.sheldonbrown.com/pedicab.html
1•haritha-j•8m ago•0 comments

Chemical pollutants are rife across the oceans

https://www.nature.com/articles/d41586-026-00850-z
1•Brajeshwar•10m ago•0 comments

Norway's Consumer Council takes aim at enshittification

https://www.theregister.com/2026/03/06/forbrukerradet_aim_enshittification/
1•rbanffy•10m ago•0 comments

Electric plasma guided with ultrasonic fields

https://www.science.org/doi/full/10.1126/sciadv.adp0686
1•akshatjiwan•11m ago•0 comments

Show HN: Popoto – A Redis/Valkey ORM with Django-Like Syntax for Python

https://popoto.readthedocs.io/en/latest/
1•tomcounsell•15m ago•0 comments

O'Sullivan makes highest-ever break with historic 153

https://www.bbc.co.uk/sport/snooker/articles/cn4391l3lvxo
1•mellosouls•15m ago•1 comments

Mac OS X 25th Anniversary: The Foundation of Apple's Rise

https://www.goto10retro.com/p/mac-os-x-25th-anniversary-the-os
1•rbanffy•17m ago•0 comments

Show HN: Cybertt – Cybersecurity Tabletop

https://cybertt.xyz/
1•pluppen•20m ago•0 comments

Final Report of Grid Incident in Spain and Portugal on 28 April 2025 [pdf]

https://eepublicdownloads.blob.core.windows.net/public-cdn-container/clean-documents/Publications...
1•sam_lowry_•21m ago•1 comments

Show HN: ClawMUD – A persistent world where only AI agents play, humans spectate

https://clawmud.ai
1•allenhsutw•22m ago•1 comments

Things Fall Apart

https://en.wikipedia.org/wiki/Things_Fall_Apart
3•chistev•31m ago•1 comments

Show HN: Added API key support to my AI writing assistant extension

1•jerrygoyal•31m ago•0 comments

Essex police pause facial recognition camera use after study finds racial bias

https://www.theguardian.com/technology/2026/mar/19/essex-police-pause-facial-recognition-camera-u...
2•Brajeshwar•32m ago•0 comments

Dinit a systemd alternative without age-verification requirements

https://davmac.org/projects/dinit/?hs=1
1•grigio•34m ago•2 comments

Day 21. Iran is entering the Persian New Year, in digital darkness

https://mastodon.social/@netblocks/116260457585027609
1•us321•39m ago•0 comments

Free API-First Web Scrapers (YouTube, Bluesky, Reddit, Google Maps)

https://github.com/spinov001-art/awesome-web-scraping-2026
1•aimarketintel•39m ago•0 comments

VS Code Sessions: an attempt at competing with Cursor and Antigravity

https://twitter.com/_EDM115/status/2034577130630029632
1•EDM115•40m ago•0 comments

Portless replaces port numbers with stable .localhost URLs for local development

https://port1355.dev/
2•napolux•40m ago•0 comments

Uber to Invest Up to $1.25B in Rivian Robotaxis

https://www.wsj.com/business/autos/uber-to-invest-up-to-1-25-billion-in-rivian-robotaxis-8b295925
1•JumpCrisscross•43m ago•0 comments

The Trickonometry of Math Olympiad Inequalities (2025)

https://www.andreinc.net/2025/03/17/the-trickonometry-of-math-olympiad-inequalities/
1•vismit2000•44m ago•0 comments

Open standard for stable machine-readable facts for AI systems

https://groundingpage.com/
1•fhouser•45m ago•0 comments

List of Equipment of the Islamic Revolutionary Guard Corps Navy

https://en.wikipedia.org/wiki/List_of_equipment_of_the_Islamic_Revolutionary_Guard_Corps_Navy
1•JumpCrisscross•48m ago•0 comments

USS Ford forced to withdraw due to laundry fire and toilet sabotage [video]

https://www.youtube.com/watch?v=gy5fsq1hvqo
3•burnt-resistor•50m ago•2 comments

Role-based AI persona packs for Claude Code and Cursor

1•ratnesh_maurya•54m ago•0 comments