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.

What Are Cipher Suites – TLS Algorithm Negotiation Explained

https://www.qcecuring.com/education/cryptography-fundamentals/what-are-cipher-suites
1•eustoria•2m ago•0 comments

A cinematic 3D graph view for Obsidian

https://community.obsidian.md/plugins/galaxy-view
1•eustoria•3m ago•0 comments

Survey: What do you use to manage your cap table?

https://tally.so/r/J11O8Y
1•MKBSP•4m ago•0 comments

Tiny Computers for iPhone Duo

https://www.fountaininteractive.com/TinyComputers/
2•eustoria•4m ago•0 comments

Apple's Foldable iPhone Duo Draws Early Complaints of the Screen Cracking

https://www.bloomberg.com/news/articles/2026-10-26/apple-s-foldable-iphone-duo-draws-early-compla...
1•0xedb•4m ago•0 comments

Code as schema: how we generate the Increase API

https://increase.com/articles/code-as-schema
2•jackflintermann•4m ago•1 comments

Cubic Boron Arsenide: An emerging semiconductor (2025)

https://www.sciencedirect.com/science/article/abs/pii/S2590238525001742
1•peter_d_sherman•5m ago•0 comments

What WordPress Calendar Vulnerabilities Reveal About Trusting User Content

https://www.cybersecurity-insiders.com/what-wordpress-calendar-vulnerabilities-reveal-about-trust...
2•mooreds•5m ago•0 comments

Small Actions Spark Movements

https://www.topplers.org/
1•mooreds•5m ago•0 comments

Which Request Burned the CPU? Span-Tagged Profiles on Virtual Threads

https://www.sku20.dev/blog/which-request-burned-the-cpu-span-tagged-profiles-on-virtual-threads/
1•duckydude20•6m ago•0 comments

PerfectHead is back: Perfect Dark's cut Game Boy Camera feature, restored

https://twitter.com/zeronecool/status/2114692130417394128
1•failedartifact•6m ago•0 comments

Should Snap start selling data for RL?

1•vedootmetoot•7m ago•0 comments

The Robotics Map: robotics companies across the stack

https://roboticsmap.org
1•gmays•9m ago•0 comments

Duality in Spherical Trigonometry

https://www.johndcook.com/blog/2026/10/24/polar-triangle/
1•ibobev•9m ago•0 comments

How Voting Is Like a Klein Bottle

https://www.quantamagazine.org/how-voting-is-like-a-klein-bottle-20261026/
2•ibobev•9m ago•0 comments

A Summer with Claude and Relative Arbitrage, by Dmitriy Traytel

https://lawrencecpaulson.github.io//2026/10/26/Relative_arbitrage.html
1•ibobev•9m ago•0 comments

Open source models are much worse at training other models

https://www.frontierml.org/
1•MonLiH•10m ago•0 comments

Nvidia discusses $2k-per-GPU annual fee for software

https://www.tomshardware.com/pc-components/gpus/nvidia-discusses-usd2-000-per-gpu-annual-software...
2•gscott•11m ago•1 comments

Using AI Verification and Fix Loop for IaC (Terraform, OpenTofu, Pulumi)

https://masterpoint.io/blog/ai-verification-fix-loop-iac/
1•mooreds•11m ago•0 comments

Devin Security 2.0: Built for the new threat landscape

https://devin.ai/blog/devin-security-2
1•jerrygarcia•12m ago•0 comments

Show HN: Portable, signed agreements for AI agents

https://covenant-common.github.io/covenant-docs/
1•jupie•13m ago•0 comments

ChatGPT Keeps Telling People 404 Media Can Solve Their Tech Support Problems

https://www.404media.co/chatgpt-keeps-telling-people-404-media-can-solve-their-tech-support-probl...
7•cdrnsf•14m ago•0 comments

Animating with Agents Tutorial (GSAP plus custom skills)

https://tympanus.net/codrops/2026/10/26/animating-agents-gsap-animaxxing/
1•johnpolacek•14m ago•0 comments

Well-paid tech workers pay tax on unrealized gains. Billionaires can too

https://sf.gazetteer.co/guest-commentary-thousands-of-well-paid-tech-workers-already-pay-tax-on-u...
4•HotGarbage•14m ago•1 comments

WarpSexy – Daily Idol and Model Reviews

https://warpsexy.online/
20•crossi•15m ago•4 comments

Walter Koenig, Ensign Chekov on original 'Star Trek' series, dies at 90

https://apnews.com/article/walter-koenig-dies-ad6aed51fc41417a8812bffccec1393c
3•shagie•16m ago•0 comments

It took years for Abortion.org to be about abortion

https://19thnews.org/2026/10/abortion-care-website-information/
1•DeepLogin•16m ago•1 comments

Show HN: RPI Pico (RP2040) PIO Emulator Package for Go

https://git.edwardh.dev/pio
2•headblockhead•16m ago•0 comments

Should Police Wipe a Criminal's Cellphone Before Returning It?–U.S. vs. Stathas

https://blog.ericgoldman.org/archives/2026/10/should-police-wipe-a-criminals-cellphone-before-ret...
2•hn_acker•17m ago•0 comments

Show HN: Nerd Fonter – macOS App to Install Nerd Fonts

https://shapemachine.xyz/nerd-fonter/
1•factorialboy•17m ago•0 comments