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.

Ask HN: Where to Look for Jobs?

1•0x737368•45s ago•0 comments

Snowden on AI Surveillance and Freedom of Speech [video]

https://www.youtube.com/watch?v=wytH7dPlCVw
1•hauget•1m ago•1 comments

Peer review in the LLM (mania) age

https://www.humprog.org/~stephen/blog/research/llms-review-mania.html
1•pcfwik•1m ago•0 comments

LemonBeam

https://github.com/oslabs-beta/lemonbeam
1•Johndelong•2m ago•0 comments

ESA and Mistral strengthen cooperation on AI

https://www.esa.int/Newsroom/Press_Releases/ESA_and_Mistral_strengthen_cooperation_on_artificial_...
1•giuliomagnifico•2m ago•0 comments

I Stay Off Twitter

https://www.jefftk.com/p/why-i-stay-off-twitter
1•surprisetalk•3m ago•0 comments

Study shows AI is as good as human tutoring for GRE learning gains

https://arxiv.org/abs/2609.28470
1•cgn•4m ago•0 comments

Looking for a Remote Full-Time, full stack developer Job

https://tailstory-app.com/en/about
1•Mohsentr•5m ago•0 comments

Territory claims in Antartica look when Antartica has no ice

https://blog.willmeye.rs/how-territory-claims-in-antartica-look-when-antartica-has-no-ice/
2•willmeyers•26m ago•1 comments

Stabilizing Rust's Never Type

https://lwn.net/Articles/1091015/
1•signa11•31m ago•0 comments

How many strings can you create per second?

https://lemire.me/blog/2026/09/25/how-many-strings-can-you-create-per-second/
1•smilelamp•33m ago•0 comments

What OS should I pick?

1•ronk_employee•34m ago•1 comments

Farside.link has been shut down

https://farside.link
1•Baljhin•35m ago•1 comments

Deterministic Testing for Multithreaded Python

https://lwn.net/Articles/1090579/
1•pykello•37m ago•0 comments

A geothermal amoeba sets a new upper temperature limit for eukaryotes

https://www.cell.com/cell/fulltext/S0092-8674(26)01016-0
1•wslh•40m ago•0 comments

Show HN: Clippy's Revenge – Made by Opus 5.5 [video]

https://www.youtube.com/watch?v=qUaBObmpYTI
1•HaxleRose•40m ago•0 comments

Pentum_Graph [WorldNews_YouTube]

https://project.pentumlab.com/graph/
1•rholzer•40m ago•1 comments

Ask HN: Do you token max? Why or why not?

1•bgnm2000•43m ago•1 comments

The AI Build-Out Is Becoming the Biggest Economic Bet in U.S. History

https://www.wsj.com/economy/the-ai-build-out-is-becoming-the-biggest-economic-bet-in-u-s-history-...
3•CharlesW•44m ago•0 comments

Show HN: OpsCart – Read-only Kubernetes triage with incident history

https://github.com/opscart/opscart-k8s-watcher
1•opscart•50m ago•0 comments

Send GitLab an email, push to main

https://www.aikido.dev/blog/gitlab-email-push-to-main
2•crgwbr•53m ago•0 comments

Show HN: Live Quantum Circuits Visualizator for Reinforcement Learning

https://github.com/SorBalda/Reinforcement-Learning-SARSA-Q-LEARNING-DEEP-Q-LEARNING
1•sorbalda•1h ago•0 comments

Sandbox/computer to be added to your product

https://pine.im/download
1•faye_yfg•1h ago•0 comments

VeriTile: Formal Verification for Triton Kernels

https://lizn-zn.github.io/VeriTile/
2•matt_d•1h ago•0 comments

Design Experiments with the Amytis Agent

https://www.amytis.io/blog/design-experiments-with-the-amytis-agent
1•JohnHammersley•1h ago•0 comments

Nobody Has a Good Answer for Agentic Identity Yet

https://fusionauth.io/blog/ldx3-nyc-2026-report
4•mooreds•1h ago•1 comments

Paul Graham on LLMs 'Thinking'

https://twitter.com/paulg/status/2103135915195371973
3•fooker•1h ago•4 comments

Pragtical v3.13.0 is out with native audio API and built-in audio player

https://pragtical.dev/blog/pragtical-v3130-release
1•rd07•1h ago•0 comments

Fluid Simulation on Flip Dots

https://mitxela.com/projects/flipflip
1•marvinborner•1h ago•0 comments

ServingStudio: Simulating, Analyzing, and Optimizing LLM Serving Systems

https://syfi-servingstudio.github.io/ServingStudioIntro/blog/introducing-servingstudio/
3•matt_d•1h ago•0 comments