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.

Geopolitical jitters push Europe's internet registry away from cloud strategy

https://www.theregister.com/networks/2026/06/19/geopolitical-jitters-push-europes-internet-regist...
1•mooreds•1m ago•0 comments

Therapy ferrets used to kill rats at UK's largest children's prison

https://www.theguardian.com/society/2026/jun/21/therapy-ferrets-kill-rats-uk-largest-children-pri...
2•mooreds•4m ago•0 comments

WebGPU feature detection was not enough to run small LLMs on phones

https://ludion.ai/blog/webgpu-reports-vs-reality/
1•Littice•5m ago•0 comments

Speculation Is All You Need

https://modal.com/blog/spec-is-all-u-need
1•birdculture•5m ago•0 comments

Fugu: Learn to assemble, route, and coordinate expert agents [pdf]

https://github.com/SakanaAI/fugu/blob/main/Fugu_technical_report.pdf
1•saran945•6m ago•0 comments

Extreme Time Value of Money: Late-Stage Career Planning (2021)

https://newsletter.kentbeck.com/p/extreme-time-value-of-money-late
1•mooreds•6m ago•0 comments

Manticore Search 27.1.5

https://manticoresearch.com/blog/manticore-search-27-1-5/
1•snikolaev•17m ago•1 comments

Chile turned to China for an undersea cable. The U.S. said no

https://restofworld.org/2026/chile-china-america-google-cable/
2•higginsniggins•23m ago•0 comments

AI Watchdog

https://www.theatlantic.com/category/ai-watchdog/
1•mikhael•24m ago•0 comments

Ask HN: What will AI coding look like when today's CS freshmen graduate?

1•linzhangrun•25m ago•0 comments

Show HN: Local-first LaTeX editor – open-source

https://apps.microsoft.com/detail/9p6038j2bxtp?hl=en-US&gl=US
1•leonardosalasd•26m ago•0 comments

Canadian government spent $46.8M on a secret Palantir contract

https://theijf.org/brief/canadian-palantir-contract-amendments-obd
4•logickkk1•28m ago•0 comments

Sakana Fugu

https://sakana.ai/fugu/
13•Finbarr•37m ago•0 comments

Show HN: Free AI courses that require a short reflection to earn a certificate

https://www.abc.com.py
1•pfannl•37m ago•0 comments

Why the Human Genome's Tangled Physicality May Confound AI

https://www.quantamagazine.org/why-the-human-genomes-tangled-physicality-may-confound-ai-20260618/
1•Jimmc414•40m ago•0 comments

Tlbic: A Time-Limited Basic Income System Designed with AI, v7.0

https://drive.google.com/file/d/1MtiNjQeQO9ilLuEFXwVeKgWOzec4F2Dn/view?usp=drive_link
2•michikawa59•42m ago•2 comments

Staggeringly precise optical lattice clock has a wealth of practical application

https://www.nippon.com/en/in-depth/d01235/
1•anigbrowl•43m ago•0 comments

Rights for Gods

https://www.lrb.co.uk/blog/2026/june/rights-for-gods
2•mitchbob•45m ago•1 comments

Microbubbles in Medicine

https://worksinprogress.co/issue/microbubbles/
2•Jimmc414•46m ago•0 comments

Microsoft Activation Scripts – Activate Windows / Office / ESUs

https://github.com/massgravel/Microsoft-Activation-Scripts
1•beatthatflight•46m ago•1 comments

Watt lies beneath (Geothermal Energy)

https://worksinprogress.co/issue/watt-lies-beneath/
1•Jimmc414•48m ago•0 comments

Josh helps Rust manage code across multiple repositories

https://blog.rust-lang.org/inside-rust/2026/06/04/how-josh-helps-rust-manage-code-across-multiple...
2•Tiberium•56m ago•0 comments

My Opinion on RL

2•umjunsik132•1h ago•0 comments

The Art of Kite Flying (1430–1929)

https://publicdomainreview.org/collection/art-of-kite-flying/
2•benbreen•1h ago•0 comments

Show HN: Woltspace – a lodge for your coding agents

https://www.woltspace.com/
2•jerpint•1h ago•0 comments

GitHub Banned All CI for Our (OSS) Org Because of Bad Drive-By Contributors

6•BlueMatt•1h ago•0 comments

Americans and AI 2026: Chatbots, Smart Devices and Views on Impact

https://www.pewresearch.org/internet/2026/06/17/americans-and-ai-2026-chatbots-smart-devices-and-...
3•toomuchtodo•1h ago•1 comments

Rightwing populist 'El Tigre' wins Colombia election

https://www.ft.com/content/49294716-56be-40a4-ba31-b4e376ccb47f
2•petethomas•1h ago•0 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
9•andsoitis•1h ago•1 comments

Crossary – AI-assisted field mapping that outputs signed Excel files

https://www.crossary.com
2•migueljpalmeida•1h ago•0 comments