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.

"Intelligence curse" means promise of abundance and UBI unlikely to be fulfilled

https://intelligence-curse.ai/defining/
2•thoughtpeddler•5m ago•0 comments

Known registered domain count for every TLD

https://namedesk.app/stats/tlds
1•zeppelin_7•9m ago•0 comments

Australian government to chart course away from 'American war machine'

https://www.theguardian.com/australia-news/2026/sep/08/grassroots-labor-pressure-group-albanese-g...
1•Alien1Being•11m ago•0 comments

Train Jazz

https://www.aico.nyc/amtrak
1•bookofjoe•16m ago•0 comments

Actually Real AI

https://actually-real-ai.com/
1•measurablefunc•16m ago•0 comments

DoodleIQ – Rent your idle local-LLM machine to others by the second

https://www.doodleiq.com/
1•rahulbats•17m ago•0 comments

Speeding up a Phoenix LiveView web app with a CDN

https://jola.dev/posts/speeding-up-phoenix-liveview-cdn
1•auraham•17m ago•0 comments

Michigan Scientist Buried Seeds in Glass Bottles in 1879, 142 Yr Later Some Grew

https://timesofindia.indiatimes.com/science/a-michigan-scientist-buried-seeds-in-20-glass-bottles...
1•rmason•18m ago•0 comments

Cool Web Tool – I got tired of paying for multiple SEO tools

https://coolwebtool.com/
1•umit-ozturk•21m ago•0 comments

The Education of a Doomer

https://borretti.me/article/the-education-of-a-doomer
2•f311a•23m ago•0 comments

x86 Evolution for Segmentation and Paging

https://inbox.sourceware.org/binutils/CAKSQd8XJVf3jq8boOJcOE_GzcNvcqMUHeW-whbw3uGnVE2iN_w@mail.gm...
1•st_goliath•23m ago•0 comments

Working on Economics with Fable 5

https://wilsoniumite.com/2026/08/03/working-on-economics-with-fable-5/
2•Wilsoniumite•24m ago•0 comments

One Thing Worth Thinging

2•arkensaw•27m ago•1 comments

Please, take 2 min to tell your representative to regulate AI (US)

https://actonai.org/
1•doitLP•28m ago•0 comments

I built a workspace beside Safari instead of another browser

https://tiledbrowser.app/articles/why-i-built-a-workspace-beside-safari/
1•tiledbrowser•30m ago•0 comments

"code masturbation": getting pleasure out of making something only for yourself

https://www.youtube.com/watch?v=pVMM23kUVH8
1•thebooglebooski•31m ago•1 comments

The smallest edge AI device for local LLMs

https://tiiny.ai/
4•alex-moon•33m ago•0 comments

Own Your Means of Production

https://mcottondesign.com/post/own-your-means-of-production/
2•mcotton•33m ago•0 comments

Show HN: Intercontinental Ballistic Wikipedia Edit Map

https://defamation.dev/icbe/
4•UrineSqueegee•38m ago•0 comments

The purpose of DNS is to spread scams

https://shkspr.mobi/blog/2026/09/the-purpose-of-dns-is-to-spread-scams/
3•pavel_lishin•42m ago•1 comments

Show HN: Rejourney – Finds user "leaks" in apps and websites

https://rejourney.co/demo/leaks
1•mrr7337•45m ago•0 comments

Pixel is a unit of length and area

https://www.nayuki.io/page/pixel-is-a-unit-of-length-and-area
2•speerer•48m ago•2 comments

Beta User for Proven Trips

https://proventrips.com
3•rohitnrl•50m ago•1 comments

Show HN: DNTLS – Decentralized Trust Layer for the Open Internet

https://dntls.net/
2•aliasxneo•51m ago•0 comments

Monthly Updates [Sept]

https://fmhy.net/posts/sept-2026
2•Cider9986•52m ago•0 comments

Girder – an MCP server that gives coding agents a code graph

https://github.com/dhishwasher/Girder
1•dhishwasher•53m ago•0 comments

Ollama replacement 2-4x faster for no extra compute cost

https://github.com/omgitsbase/llmash
1•wowitsbase•55m ago•4 comments

Wabi-sabi

https://en.wikipedia.org/wiki/Wabi-sabi
2•sdeframond•55m ago•0 comments

DeepSeek V4 Flash across 14 providers: cost, speed and caching

https://www.inference.academy/benchmarks/serving-tradeoffs
3•batuhanaktas61•56m ago•1 comments

From Spring Boot to Swift: The Business Logic Was the Cheap Part

https://leosolbach.medium.com/from-spring-boot-to-swift-the-business-logic-was-the-cheap-part-206...
1•frizlab•56m ago•1 comments