frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Emergence World: A Laboratory for Evaluating Long-Horizon Agent Autonomy

https://www.emergence.ai/blog/emergence-world-a-laboratory-for-evaluating-long-horizon-agent-auto...
1•Anon84•1m ago•0 comments

Deep Dive into Kubernetes Gateway API

https://www.romaglushko.com/blog/k8s-gateway-api/
2•karakoram•8m ago•0 comments

"At Meta, 90% of my coworkers were Chinese, non-Chinese were routinely excluded"

https://twitter.com/jeremybernier/status/2058243373161722185
2•qwertyuiop_•8m ago•0 comments

Practical Uses of Monads in Haskell

https://nauths.fr/en/2026/05/28/practical-use-of-monads.html
2•karakoram•8m ago•0 comments

Show HN: AionDbB

https://github.com/ayoubnabil/aiondb
3•K9987plus•13m ago•1 comments

Ruby Client for the Model Context Protocol (MCP)

https://github.com/zarpay/manceps
2•mooreds•17m ago•0 comments

Show HN: Web-based wc3 warlocks brawl

https://warlocks.app/
2•razum9•19m ago•0 comments

World Cup Sponsorships: Online Communities Changing the Game

https://graphika.com/posts/world-cup-sponsorships-online-communities-changing-the-game
2•mooreds•19m ago•0 comments

Markdown Tables Generator – Tablesgenerator.com

https://www.tablesgenerator.com/markdown_tables
3•wingmanjd•19m ago•1 comments

US healthcare still stupidly expensive, with pathetic outcomes, study finds

https://arstechnica.com/health/2026/05/us-healthcare-still-stupidly-expensive-with-pathetic-outco...
3•rbanffy•19m ago•1 comments

HarnessKit – Manage skills/MCP/hooks/plugins/memory across all your Agents

https://github.com/RealZST/HarnessKit
3•cyberditto•20m ago•0 comments

New solar desalination breakthrough makes fresh water without toxic brine

https://www.sciencedaily.com/releases/2026/05/260530053418.htm
2•rmason•21m ago•0 comments

ChatGPT for Google Sheets Exfiltrates Workbooks

https://www.promptarmor.com/resources/gpt-for-google-sheets-data-exfiltration
2•hackerBanana•25m ago•0 comments

In northern Ukraine, it was boy vs. Russian drone. The boy won

https://www.washingtonpost.com/world/2026/05/15/russian-drones-hunt-ukrainians-human-safari-boy-f...
7•rmason•27m ago•2 comments

Show HN: GEDD – Find what your AI agent gets wrong (before your users do)

https://github.com/aws-samples/sample-GEDD
2•balasvce19855•29m ago•0 comments

Benchmarking TurboQuant with MLX on Apple Silicon

https://www.youtube.com/watch?v=pRsAr51iTnI
2•tcp_handshaker•31m ago•0 comments

Minecraft YouTubers explain passive investing [video]

https://www.youtube.com/watch?v=NM6tmqJil7I
2•Cider9986•31m ago•0 comments

C is older than my mom

3•alonsovm44•32m ago•3 comments

Patching my guitar amp's firmware

https://mforney.org/blog/2026-05-28-patching-my-guitar-amps-firmware.html
4•birdculture•33m ago•0 comments

Show HN: Missed Connections Site Replacing Craigslist

https://ivmissed.com/SF
2•Loyae•34m ago•0 comments

The Agentic Mesh: Cognitive Automation at Scale

https://blog.owulveryck.info/2026/05/31/the-agentic-mesh-cognitive-automation-at-scale.html
2•owulveryck•35m ago•0 comments

California Academy of Sciences is a world class museum. Here’s how it dies

https://www.sfchronicle.com/opinion/openforum/article/california-academy-sciences-museum-22280835...
3•thebigship•35m ago•0 comments

April in Servo: new Android UI, focus, forms, security fixes, and more

https://servo.org/blog/2026/05/31/april-in-servo/
2•dabinat•37m ago•0 comments

Researchers let AI models run a simulated society

https://fortune.com/2026/05/28/ai-model-simulation-claude-chatgpt-grok-gemini/
3•ilkkao•40m ago•0 comments

Two Kinds of Programs: Closed Worlds and Open Worlds

https://blog.sturdystatistics.com/posts/open_world/
2•kianN•41m ago•0 comments

The Pewdiepie Agent Framework

https://pewdiepie-archdaemon.github.io/odysseus/#features
3•christkv•42m ago•1 comments

After decades on Linux, FreeBSD gave me a reason to switch operating systems

https://www.zdnet.com/article/freebsd-linux-review/
2•rodrigo975•43m ago•0 comments

100 Officers Hunt Down Armed Cop Killer [video][20 mins]

https://www.youtube.com/watch?v=BH4k_jllNks
2•Bender•43m ago•0 comments

Euro-Office Alternative to Microsoft Office and Google Docs, Launches June 9

https://www.zdnet.com/article/euro-office-a-sovereign-cloud-based-office-suite-google-microsoft-a...
5•abdelhousni•47m ago•0 comments

Monal IM 6.4.21 released – open-source Jabber/XMPP client for macOS and iOS

https://monal-im.org/
2•neustradamus•49m ago•0 comments