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

[not serious] World's most honest customer support widget

https://nocustomersupport.com/
1•utkarsh_apoorva•1m ago•0 comments

Show HN: Claude Relay – local Claude Code sessions message each other

https://github.com/innestic/claude-relay
1•vildanbina•2m ago•1 comments

Jensen Huang – Will Nvidia's moat persist? [video]

https://www.youtube.com/watch?v=Hrbq66XqtCo
1•rguiscard•5m ago•0 comments

Elasticsearch Workflows GA

https://www.elastic.co/security-labs/elastic-workflows-ga-9-4
1•shahargl•5m ago•0 comments

Competing Biases Underlie Overconfidence and Underconfidence in LLMs

https://www.nature.com/articles/s42256-026-01217-9
1•not_a_feature•7m ago•1 comments

Planning My Kubernetes Homelab

https://www.jonashietala.se/blog/2026/05/05/planning_my_kubernetes_homelab/
1•lawn•11m ago•0 comments

Show HN: I built Pagome – SEPA payment links via GiroCode QR (free, no server)

https://pagome.com
2•urbanisierung•14m ago•1 comments

Toyota built a $10B private utopia–what's going on in there?

https://arstechnica.com/cars/2026/05/inside-toyotas-10b-private-utopia-big-ideas-few-people-camer...
1•rbanffy•16m ago•0 comments

Show HN: Memex, Claude memory via local RAG (MCP, offline embeddings)

https://memex-cli.vercel.app/
1•bboydart•20m ago•0 comments

Astronomers find atmosphere around a solar system object that shouldn't have one

https://www.cnn.com/2026/05/04/science/kuiper-belt-object-atmosphere
2•reconnecting•21m ago•0 comments

Turn a feature spec into reviewed, merged code with bounded AI agents

https://github.com/alex-reysa/pm-go
1•alexreysa•22m ago•0 comments

What is the best CTF Hosting Platform?

1•Hannah_Adam•24m ago•0 comments

China Opens Rocket Launches to International Satellites

https://www.china-in-space.com/p/china-opens-dozens-of-rocket-launches
4•JPLeRouzic•26m ago•0 comments

APIs as infrastructure: future-proofing Stripe with versioning (2017)

https://stripe.com/blog/api-versioning
1•corentin88•26m ago•0 comments

How to Test a Salesforce Experience Aura Site Like an Apex Predator

https://www.reco.ai/blog/salesforce-experience-site-pentest-apex-predator
1•llmacpu•27m ago•0 comments

DHS Demanded Google for Data on Canadian's Activity, Location over Anti-ICE

https://archive.is/2026.05.04-155719/https://www.wired.com/story/dhs-demanded-google-surrender-da...
2•exceptione•27m ago•1 comments

LinkedIn locks your GDPR rights behind a paywall

https://noyb.eu/en/linkedin-locks-your-gdpr-rights-behind-paywall
13•doener•28m ago•1 comments

Are Installers Dead?

https://www.exasol.com/blog/are-installers-dead/
8•fwberlin•31m ago•1 comments

Current AI Custom Prompt

https://twitter.com/pmarca/status/2051374498994364529
1•tosh•32m ago•0 comments

OpenAI and Anthropic launch ventures to speed enterprise AI adoption

https://www.sofx.com/openai-and-anthropic-launch-rival-pe-joint-ventures-to-address-enterprise-ai...
2•01-_-•34m ago•0 comments

Pg_sorted_heap 0.13.0 Released

https://www.postgresql.org/about/news/pg_sorted_heap-0130-released-3289/
1•iaziz786•34m ago•0 comments

MCP-Sync: One Config File to Rule Them All

https://medium.com/@vektormemory/mcp-sync-one-config-file-to-rule-them-all-8fa0837fc4c8
1•vektormemory•36m ago•0 comments

SaaS Isn't Dying. Its Users Are

https://tomashvili.com/posts/SaaS_Is_not_Dying_Its_Users_Are
2•beka-tom•38m ago•1 comments

WhenFS – Your Calendar Is Now a File System

https://github.com/lvkv/whenfs
1•wise_blood•39m ago•0 comments

One Year of EventSourcingDB, and the Language That Belongs Beside It

https://docs.eventsourcingdb.io/blog/2026/05/05/one-year-of-eventsourcingdb-and-the-language-that...
1•goloroden•40m ago•0 comments

Pgbackrest gets funding and will be maintained

https://github.com/pgbackrest/pgbackrest/commit/b93a2b8807adabec02ef33cca838e30f109c3eba
3•polyrand•43m ago•0 comments

BitStack – 1-bit gradient masks for continual learning without replay

https://github.com/g1g4b1t/bitstack
1•Piotr_Gawron•44m ago•0 comments

Podman rootless containers and the Copy Fail exploit

https://garrido.io/notes/podman-rootless-containers-copy-fail/
1•g0xA52A2A•45m ago•0 comments

How to make SSE token streams resumable, cancellable, and multi-device

https://zknill.io/posts/everyone-said-sse-token-streaming-was-easy/
1•zknill•45m ago•0 comments

Tfsec, Static Linter for Terraform

https://aquasecurity.github.io/tfsec/v1.28.13/
1•l1am0•46m ago•0 comments