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.

Show HN: WifeBench – My wife vibes LLM rankings

https://www.wifebench.com/
1•fristovic•1m ago•0 comments

Dermatology is wrong about the sun

https://twitter.com/MattZirwas/status/2050586857868591306
1•bilsbie•3m ago•0 comments

Automate Excel with Python: From manual grind to one-click workflow

https://nostarch.com/automate-excel-with-python
1•teleforce•4m ago•0 comments

Trump pardons 11, most for violating Clean Air Act

https://www.reuters.com/legal/government/trump-pardons-11-most-violating-clean-air-act-2026-07-04/
1•Kapura•5m ago•0 comments

Show HN: Isthistechdead.com got a full UI revamp

https://isthistechdead.com/
1•jobehi•7m ago•0 comments

America imports 99% of its fireworks from China

https://justinkuiper.substack.com/p/america-imports-99-of-its-fireworks
3•zdw•10m ago•0 comments

The Structural Failure of Disciplinary Science: What a Machine Found in 2 Hours

https://zenodo.org/records/21198389
1•javieralbuixech•11m ago•0 comments

Heddle

https://heddle.sh/
1•handfuloflight•12m ago•0 comments

Ramp data shows heavy AI adopters hire more

https://econlab.substack.com/p/we-can-finally-say-ai-isnt-killing-jobs
1•skybrian•16m ago•0 comments

Can you train AI to invert AES?

https://www.juanslozano.com/blog/ai-aes
1•juansebastianl•17m ago•0 comments

Counting Until the End of the Universe

https://essenceia.github.io/projects/until_heat_death_do_us_part/
2•random__duck•22m ago•1 comments

ContainerUtility: A macOS app for the container CLI

https://github.com/erdaltoprak/ContainerUtility
2•erdaltoprak•24m ago•0 comments

Living subscription-free in my brain

https://mapwriting.substack.com/p/living-subscription-free-in-my-brain
2•doitLP•25m ago•0 comments

Exploiting LLM Agent Supply Chains via Payload-Less Skills

https://arxiv.org/abs/2605.14460
1•_pdp_•27m ago•0 comments

Show HN: Apple Foundation Model in Xcode-Beta

https://gist.github.com/voxels/b6ea737dd127745f9af009ebd038ded4
1•edgcumbe•29m ago•0 comments

Omegacode: Code based orchestration for any coding agent

https://github.com/Sawyerhood/omegacode
1•handfuloflight•33m ago•0 comments

3D Airplane tracker on Mercator map

https://github.com/jamalrfordii-arch/Vanguard-Map
1•Lawyer24•35m ago•0 comments

Show HN: Desunofier – Removing shimmer from Suno songs

https://www.instasong.co/tools/desunofier
1•stanyy•35m ago•0 comments

Invisible Cities: The Legal Analysis of Space Based Solar Power

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6881678&__cf_chl_f_tk=hLQWAnW2Nv4B5PaV4xX16mF...
1•Lawyer24•36m ago•0 comments

GPT-5.5 Codex reasoning-token clustering may be leading to degraded performance

https://github.com/openai/codex/issues/30364
33•maille•37m ago•4 comments

Australian influencer Lily Jay's tangled web of AI manipulation

https://www.abc.net.au/news/2026-07-05/lily-jay-foundation-posts-ai-generated-misleading-videos/1...
3•phs318u•38m ago•0 comments

Global scammers use US tech to fleece people

https://apnews.com/article/scams-fraud-technology-ai-impostor-scam-phishing-12f549d5203abd38857c4...
4•jethronethro•40m ago•0 comments

Edeward Neumeier talks about 'RoboCop'

http://www.money-into-light.com/2013/07/edward-neumeier-talks-about-robocop.html
1•firasd•40m ago•0 comments

Taking the Temperature of Black Holes(2019)

https://www.bbc.com/news/uk-scotland-47773553
1•rolph•44m ago•0 comments

Tea-dash – a gh-dash-style terminal dashboard for Gitea and Forgejo

https://github.com/gbarany/tea-dash
1•gbarany•46m ago•0 comments

Show HN: Markdown to PDF CLI Tool

https://github.com/leonardosalasd/doc-engine-cli
2•leonardosalasd•50m ago•1 comments

My AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress

https://ekinertac.com/blog/i-dont-know-rust-my-ai-is-rewriting-php-in-it/
2•ekinertac•52m ago•0 comments

GoDaddy argues India's fake site crackdown could damage internet

https://www.reuters.com/world/worlds-biggest-domain-seller-fears-indias-fake-site-crackdown-could...
4•1vuio0pswjnm7•56m ago•1 comments

Small, odd, fleeting moments in which a neighborhood briefly exceeds itself

https://www.neighborhood-stills.com/
1•alexandruboia•57m ago•0 comments

The tests are the code now

https://softwaredoug.com/blog/2026/03/10/the-tests-are-the-code-now
3•softwaredoug•59m ago•0 comments