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.

The Stubborn Myth of the Literary Genius (2025)

https://www.theatlantic.com/books/2025/11/shakespeare-marlowe-and-myth-literary-genius/684797/
1•bryanrasmussen•33s ago•0 comments

Show HN: I built a YouTube for generative videos in 50 prompts

https://gallery.samsar.one/
1•proy24•4m ago•0 comments

Show HN: Multi person realtime location tracking

https://tracktour.ir
1•misano•9m ago•0 comments

Perforce and Unreal Lore's alternative, another way to use Git

https://github.com/zhuzhonghua/blackgit
1•zhonghua•10m ago•0 comments

How dementia is being defeated

https://www.economist.com/briefing/2026/07/09/how-dementia-is-being-defeated
2•pingou•11m ago•1 comments

Wlctl – a Rust TUI for Managing Wi-Fi/ETH/VPN Using NetworkManager

https://github.com/aashish-thapa/wlctl
3•iamaashishthapa•17m ago•1 comments

Noisia: Harmful Workload Generator for PostgreSQL

https://github.com/lesovsky/noisia
1•handfuloflight•35m ago•0 comments

The Four-Color Problem and Its Philosophical Significance (1979) [pdf]

http://www.thatmarcusfamily.org/philosophy/Course_Websites/Math_S08/Readings/tymoczko.pdf
2•rfv6723•38m ago•0 comments

Curious case, comparing output from multiple LLMs

https://github.com/vseryakov/backendjs/tree/master/examples/prompts
1•vlad1719•42m ago•1 comments

How Do You Steal $1,500M in 3 Minutes? [video]

https://www.youtube.com/watch?v=E2Onvy1tWY8
1•mgh2•42m ago•0 comments

Meta removes AI feature on Instagram after global backlash

https://www.rnz.co.nz/news/science-and-technology/700735/missed-the-mark-meta-removes-ai-feature-...
5•billybuckwheat•49m ago•1 comments

Managing a small local AI budget (Mac M2 16gb)

https://millfolio.com/blog/local-ai-infra-tags/
2•winding•51m ago•0 comments

Microgrants!

https://merge.club/guide
1•audreyfei•55m ago•0 comments

The Prover, the Skeptic, and the Judge

https://insertchaos.bearblog.dev/prover-skeptic-and-judge/
1•snorbleck•58m ago•0 comments

Web Scraper Bright Data Sets $1M 'Bug Bounty' as Industry Scrutinized

https://www.bloomberg.com/news/articles/2026-07-10/web-scraper-sets-1-million-bug-bounty-as-indus...
1•1vuio0pswjnm7•1h ago•1 comments

Marble - (Education) Skill Taxonomy

https://github.com/withmarbleapp/os-taxonomy
1•soupspaces•1h ago•0 comments

No Assembler, No Linker

https://freelang.dev/no-assembler-no-linker/
2•keepamovin•1h ago•0 comments

Omegele for Weed

https://omeweed.com/
1•mmorga71•1h ago•1 comments

SpaceX's near-term AI payoff seen tethered to Earth, not outer space

https://www.reuters.com/science/spacexs-near-term-ai-payoff-seen-tethered-earth-not-outer-space-2...
1•adithyaharish•1h ago•0 comments

The crypto billionaires building a world where money buys you a vote

https://www.bbc.co.uk/news/articles/cly8eqyj8e2o
4•mindracer•1h ago•0 comments

Dither Kit

https://www.tripwire.sh/dither-kit
1•handfuloflight•1h ago•0 comments

Revving up Microsoft's 10x faster TypeScript 7

https://www.infoworld.com/article/4194567/revving-up-microsofts-10x-faster-typescript-7.html
2•baranul•1h ago•0 comments

Big Tech Doubles Debt Load to $350B in AI Spending Spree

https://www.bloomberg.com/news/articles/2026-07-10/big-tech-doubles-debt-load-to-350-billion-in-a...
7•1vuio0pswjnm7•1h ago•2 comments

Skillburst: Sync Skills with Team

https://skillburst.ai/
1•handfuloflight•1h ago•0 comments

I tried NetBSD as a desktop,it felt like stepping into the 90s in a good way

https://www.howtogeek.com/i-tried-netbsd-as-a-desktop-and-it-felt-like-stepping-into-the-90s-in-a...
3•jaypatelani•1h ago•0 comments

Young Indonesians fear for future after startup founder jailed

https://www.abc.net.au/news/2026-07-11/indonesian-fears-after-gojek-startup-founder-makarim-jaile...
1•defrost•1h ago•0 comments

The Origins of Heikki's Garden of Flowers

https://garden-of-flowers.heikkilotvonen.com/?essay
1•panic•1h ago•0 comments

Engineer

https://aicon.solutions/#about
1•laomos•1h ago•0 comments

Local open-source system design tool

https://github.com/Derssa/Torollo
1•derssa•1h ago•0 comments

Apple sues OpenAI, its employees claiming theft of trade secrets

https://www.bbc.com/news/articles/cy8w379e091o
2•vinni2•1h ago•0 comments