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

Comments

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

Public goods provision, public finance preferences, and distributional effects

https://link.springer.com/article/10.1007/s42973-025-00228-2
1•PaulHoule•12m ago•0 comments

Working with Q – Coding Agent Protocol

https://gist.github.com/ctoth/d8e629209ff1d9748185b9830fa4e79f
1•pramodbiligiri•12m ago•0 comments

Building an AI-Native Engineering Team

https://developers.openai.com/codex/guides/build-ai-native-engineering-team/
3•gmays•13m ago•0 comments

AI Adds a New Dimension to DEVONthink 4

https://www.macstories.net/reviews/ai-adds-a-new-dimension-to-devonthink-4/
1•walterbell•14m ago•0 comments

Gitmal – a static pages generator for Git repos

https://github.com/antonmedv/gitmal
3•todsacerdoti•14m ago•0 comments

Ask HN: What are you working on? (Dec 2025)

3•burgerquizz•16m ago•0 comments

ECB refuses to provide backstop for €140B Ukraine loan

https://www.ft.com/content/616c79ee-34de-425a-865e-e94ba10be788
1•petethomas•17m ago•0 comments

Flutter Winit-Wgpu Shell

https://github.com/flutter/flutter/issues/179324
1•nrbnlulu•19m ago•1 comments

Beej's Guide to C Programming

https://beej.us/guide/bgc/
6•tambourine_man•21m ago•3 comments

Let Us Deep Dive into the Search Problem

https://anvitra.ai/blog/the-search-problem/
1•melvinodsa•21m ago•0 comments

A custom Blender-to-Godot addon that makes level and gameplay creation easy

https://github.com/papercraftgames/folded-paper-engine
2•james2doyle•26m ago•0 comments

Show HN: VisiLens – Local-First and Fast Web GUI for VisiData

1•PStarH•28m ago•0 comments

Giving men a common antidepressant could help tackle domestic violence

https://theconversation.com/giving-men-a-common-antidepressant-could-help-tackle-domestic-violenc...
1•defrost•33m ago•0 comments

TikTok ramen spot?YouTube rooftop bar? TravelTreasure saves your scroll as a map

https://traveltreasure.app/
1•meghagulati•34m ago•0 comments

Amazon EKS Capabilities: Managed Argo CD, ACK, and KRO

https://aws.amazon.com/blogs/aws/announcing-amazon-eks-capabilities-for-workload-orchestration-an...
1•csantanapr•38m ago•0 comments

How Is My Idea?

https://adityadeshlahre.github.io/posts/hire-someone/
3•adityadeshlahre•38m ago•0 comments

Researchers isolate elusive cells that may slow down aging

https://www.timesofisrael.com/medical-holy-grail-israeli-researchers-isolate-elusive-cells-that-m...
3•mhb•39m ago•0 comments

Meta Superintelligence Labs: Scaling Agent Learning via Experience Synthesis

https://arxiv.org/abs/2511.03773
2•babelfish•44m ago•0 comments

The Silent (R)evolution of SAT

https://cacm.acm.org/research/the-silent-revolution-of-sat/
1•RebelPotato•44m ago•0 comments

The Complexity of Simplicity [video]

https://www.youtube.com/watch?v=Cum5uN2634o
1•bestinterest•58m ago•0 comments

Abstraction, but for Robots

https://stackoverflow.blog/2025/12/02/abstraction-but-for-robots/
1•quapster•59m ago•0 comments

Why Replicate is joining Cloudflare

https://blog.cloudflare.com/why-replicate-joining-cloudflare/
4•chmaynard•1h ago•1 comments

New FDA-approved glasses can slow nearsightedness in kids

https://abcnews.go.com/US/wireStory/new-fda-approved-glasses-slow-nearsightedness-kids-127991874
3•plun9•1h ago•0 comments

Show HN: Eatelligence – Scan pantry items, get AI recipe suggestions

https://apps.apple.com/us/app/eatelligence/id6755645485
1•xsonerx•1h ago•0 comments

Ask HN: Did I do a 5 year BS to become an algo whore?

2•leetcodewhore•1h ago•0 comments

Show HN: Imposter Game Oneline

https://impostergame.win/
1•tomstig•1h ago•1 comments

Show HN: Webclone.js – A simple tool to clone websites

https://github.com/jademsee/webclone
2•jadesee•1h ago•0 comments

AlphaFold is five years old – these charts show how it revolutionized science

https://www.nature.com/articles/d41586-025-03886-9
7•digital55•1h ago•0 comments

High School Dropout to OpenAI Researcher [video]

https://www.youtube.com/watch?v=vq5WhoPCWQ8
1•gmays•1h ago•0 comments

Frequently Asked Unicycling Questions

https://vale.rocks/posts/unicycle-faq
11•edent•1h ago•3 comments