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.

Why the Bronze Age Collapsed

https://www.worksinprogress.news/p/why-really-caused-the-bronze-age
1•measurablefunc•4m ago•0 comments

How to Calibrate Jev (and Related)

https://pypi.org/project/reexpress-sdm/
1•reexpressionist•5m ago•0 comments

Turbo Haskell

https://www.reddit.com/r/haskell/comments/1wu24oe/turbo_haskell/
3•simonmic•12m ago•0 comments

Stacking Oranges in 24 Dimensions

https://www.empirical.health/blog/ai-math-sphere-packing/
1•brandonb•12m ago•0 comments

Rivian: LiDAR R2 reaches customers in 2027, employees get it this year

https://electrek.co/2026/09/30/rivian-lidar-r2-customers-2027-autonomy-update/
2•cisc•13m ago•0 comments

56k.rip – the 1996 dial-up internet experience

https://56k.rip/
1•adunk•15m ago•0 comments

Automating Wi-Fi setup testing on the ESP32

https://groundrun.io/blog/automating-wi-fi-setup-testing-on-the-esp32/
1•adunk•16m ago•0 comments

MailDeskt v1.4.0 – A simple, fast desktop inbox for Resend, Gmail, Outlook, more

https://www.maildeskt.com/
1•jimmy_lee•17m ago•0 comments

The top secret URSALA, RAQUEL, and FARRAH satellites

https://www.thespacereview.com/article/4951/1
20•Bluestein•21m ago•0 comments

NASA observatory could be weeks away from falling to Earth after failed rescue

https://www.cnn.com/2026/09/30/science/nasa-swift-observatory-falling
2•everybodyknows•22m ago•0 comments

1.25M synthetic emails, chats, and calendar events

https://huggingface.co/datasets/sinabis-group/sinabis-synthetic-corporate-dataset
1•sinabis_1•22m ago•0 comments

Custom Mesh Radio Interface for 1980s Computers [video]

https://www.youtube.com/watch?v=4jlctItN5FI
1•Teever•23m ago•0 comments

IANA's email about why example.com changed

https://www.oliverdunk.com/2026/09/30/iana-reply
2•oliverdunk•24m ago•0 comments

Echo – A SOTA writing model for style imitation

https://echo.fulcrum.inc/
3•etherio•24m ago•0 comments

SELP: Self-Guided Symptom Check and Pain Assessment Tool

https://selp.life
2•zilijonas•24m ago•0 comments

Selpflow – Personalized Workout and Nutrition Plans

https://selpflow.com/en
1•zilijonas•25m ago•0 comments

Ask HN: Do you procrastinate less when coding with AI?

1•amichail•25m ago•0 comments

Distillation Defenses Easily Break After Reinforcement Learning

https://arxiv.org/abs/2609.35699
2•ollybritton•25m ago•0 comments

Parasitic Computing

https://en.wikipedia.org/wiki/Parasitic_computing
2•simonpure•28m ago•0 comments

China's 2,250kW chargers are in service, US thinks about 750kW next year

https://electrek.co/2026/09/30/chinas-2250kw-chargers-are-already-in-service-while-us-thinks-abou...
6•cisc•29m ago•0 comments

Show HN: Another Email Provider - Inbound

https://inbound.new
1•ryanvogel•31m ago•0 comments

AI invite codes and referral codes, live

https://aiinvitecode.com
1•febeee•31m ago•0 comments

Uber Wait Times Rise 19% as Prices Climb 53%: Study

https://www.businessinsider.com/uber-wait-times-rise-19-as-prices-climb-53-study-2026-9
7•richardbarosky•32m ago•2 comments

Warp Factories Overview

https://docs.warp.dev/factories/
1•handfuloflight•32m ago•0 comments

The Airbnb Backfire

https://www.businessinsider.com/selling-vacation-home-airbnb-rental-real-estate-price-cuts-2026-9
2•toomuchtodo•34m ago•0 comments

Cycode Extends Its ADLC Security Capabilities to Developers' Workstations

https://radicaldatascience.wpcomstaging.com/2026/09/25/cycode-extends-its-adlc-security-capabilit...
2•ddgutierrez•38m ago•0 comments

Jev predicts every plate appearance of the 2026 MLB postseason

https://live.bitgraph.ing/
2•mikeargento•38m ago•0 comments

A Cold War Spy Satellite Named After Farrah Fawcett Just Blew Apart in Orbit

https://gizmodo.com/a-cold-war-spy-satellite-named-after-farrah-fawcett-just-blew-apart-in-orbit-...
12•PLenz•40m ago•1 comments

Walking Men from Around the World

https://mossandfog.com/walking-men-from-around-the-world/
3•gaws•43m ago•0 comments

Sycophantic Chatbots Cause Delusional Spiraling, Even in Ideal Bayesians

https://arxiv.org/abs/2602.19141
3•luispa•44m ago•0 comments