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.

Codex on GPT6 Astra Low launched a rocket into space in Factorio Space Age 2.1

https://www.reddit.com/r/codex/comments/1wakicq/codex_on_gpt6_astra_low_tonight_launched_a_rocket/
2•epaga•2m ago•0 comments

America's Arsenal Runs on Two Clocks

https://gadallon.substack.com/p/americas-arsenal-runs-on-two-clocks
1•JumpCrisscross•2m ago•0 comments

Show HN: WFY24 A performance weather widget with 2km hyper-local forecasting

https://www.wfy24.com/en/widgets
1•weatherfun•3m ago•0 comments

27: Old but Oddly Relevant in late 2026 [video]

https://www.youtube.com/watch?v=dLRLYPiaAoA
1•ur-whale•4m ago•0 comments

YuzukiNeko – A Linux-Capable Allwinner F101 RISC-V SBC

https://www.cnx-software.com/2026/09/08/yuzukineko-a-linux-capable-allwinner-f101-64-bit-risc-v-s...
1•fork-bomber•4m ago•0 comments

Gen Z is the first generation less cognitively capable than their parents

https://www.upworthy.com/gen-z-technology-schools-ex1-2/
3•atan2•6m ago•0 comments

AI now reads your bank

https://bankmcp.dk/
1•maxheyer•7m ago•0 comments

Astra Is Hard to Monitor

https://thezvi.substack.com/p/astra-is-hard-to-monitor
1•7777777phil•8m ago•0 comments

Getting Started with ECP5 FPGAs on the Colorlight I5 FPGA Development Board

https://tomverbeure.github.io/2021/01/22/The-Colorlight-i5-as-FPGA-development-board.html
2•Bluestein•10m ago•0 comments

How to decide what content to publish

1•writebysachin•10m ago•0 comments

Calling for Interop 2027 Proposals

https://blogs.windows.com/msedgedev/2026/09/03/calling-for-interop-2027-proposals/
1•ksec•17m ago•0 comments

The creators of Dark Sky have a new weather app that shares multiple predictions

https://www.theverge.com/tech/883089/acme-weather-forecast-app-ios-dark-sky-creators-subscription
1•bilsbie•17m ago•0 comments

Write Things Down

https://stratechery.com/2026/write-things-down/
1•maguay•17m ago•0 comments

We rebuilt the old Google Analytics on top of GA4's data

https://github.com/adacahq/adaca-analytics
1•LambrosPhotios•19m ago•0 comments

Perfection Is Faceless

https://wilsoniumite.com/2026/09/08/perfection-is-faceless/
1•Wilsoniumite•19m ago•0 comments

St Louis restaurants are generating AI images of their food Foodies are repulsed

https://www.stltoday.com/news/local/business/article_4049a9c9-e801-4073-a8a0-347494790282.html
1•pgrote•20m ago•0 comments

High doses of Vitamin C interfere with the expansion of glioblastoma

https://www.sciencedirect.com/science/article/abs/pii/S0024320519305831?via%3Dihub=
1•bilsbie•20m ago•0 comments

Human Atlas: Interactive 3D anatomy explorer built with GPT-6 Astra

https://human-atlas-seven.vercel.app
2•ksec•20m ago•0 comments

You have my democracy sword: Media Media

https://berjon.com/media-media/
1•raybb•21m ago•0 comments

A lost archive of NYC 9/11 street art memorials comes back online

https://gothamist.com/arts-entertainment/a-lost-archive-of-nyc-911-street-art-memorials-comes-bac...
1•geox•22m ago•0 comments

Robotics with Conan: consuming ROS as a regular package

https://blog.conan.io/cpp/conan/ros/ros2/robotics/2026/09/08/Robotics-with-Conan-consuming-ROS.html
1•czoido•23m ago•0 comments

PISA 2025 Students' reading and mathematics performance declined across the OECD

https://www.oecd.org/en/about/news/press-releases/2026/09/pisa-2025-students-reading-and-mathemat...
4•mazokum•24m ago•0 comments

Addy Osmani joins Anthropic

https://twitter.com/addyosmani/status/2097210828659564642
2•afshinmeh•27m ago•0 comments

How does a hacker access your customer or membership database in 7 steps?

https://www.itsecurityawareness.ie/news/90/
1•Rubayo•27m ago•1 comments

Show HN: A browser IDE for m68000, Z80 assembly (and more), with graphics

https://asm-editor.specy.app/
1•specy•28m ago•1 comments

A.I. Models Built a Computer Worm That Could Rapidly Hack WeChat Accounts

https://www.nytimes.com/2026/09/08/us/politics/calif-ai-worm-wechat-hack.html
1•0in•28m ago•0 comments

Show HN: Alethecs – fact-checks a claim and shows its own reasoning gaps

https://www.alethecs.app
1•Mobeen0119•30m ago•3 comments

I built an SMS alerting agent for failed database migrations

https://github.com/team-telnyx/telnyx-code-examples/tree/main/sql-migration-agent
1•harpreetseehra•30m ago•0 comments

Raids, shutdowns, warning labels – India's unprecedented food safety push

https://www.reuters.com/legal/litigation/raids-shutdowns-warning-labels-indias-unprecedented-food...
1•JumpCrisscross•31m ago•0 comments

Ask HN: How do you minimize access to raw PII inside a company?

1•Securelytixdev•32m ago•0 comments