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.

How teachers are remaking classrooms for the AI age

https://www.reuters.com/world/how-teachers-are-remaking-classrooms-ai-age-2026-10-28/
2•giuliomagnifico•4m ago•0 comments

Ask HN: What YouTube channels should I let my kids watch?

1•wrxd•8m ago•2 comments

Ask HN: Are Apple app reviewers sharing app ideas?

1•barlutiu•9m ago•0 comments

"No human at the helm": Delaware plan would let AI agents run businesses

https://arstechnica.com/tech-policy/2026/10/no-human-at-the-helm-delaware-plan-would-let-ai-agent...
2•gvieri•12m ago•0 comments

Oil Spill on Dubai's Beaches via Satellite

https://twitter.com/sabman/status/2115604266232737881
2•sabman•16m ago•1 comments

S.Korea AI chip startup raises $620M at a $2.9B valuation

https://www.bloomberg.com/news/articles/2026-10-28/furiosaai-quadruples-valuation-to-2-9-billion-...
3•haebom•16m ago•0 comments

Does Running an E-Paper Display at 30 FPS Destroy It?

https://hackaday.com/2026/10/28/does-running-an-e-paper-display-at-30-fps-destroy-it/
1•sohkamyung•16m ago•0 comments

Show HN: Mist – a tool pairing SAST and Fuzzing for smarter Bug Hunting

https://github.com/alessandroPalazzolo/mist
1•alessandroroche•18m ago•0 comments

YourOwnWeigh – Sync your Withings scales anywhere you want (for free)

https://www.tomanthony.co.uk/blog/withings-yow-free-wifi-sync/
1•TomAnthony•20m ago•0 comments

What "ten sorts in ten languages" say about the abstraction we're living through

https://george.mand.is/2026/10/you-already-dont-understand-your-code/
2•adityaathalye•23m ago•0 comments

What Wall Street Thinks About the AI Trade Now

https://www.bloomberg.com/news/articles/2026-10-29/what-wall-street-really-thinks-about-the-ai-tr...
2•angry_impala•24m ago•0 comments

Ask HN: Is cloudfare workers better than Vercel? (free tier)

1•rohansrma•26m ago•2 comments

Ask HN: Why not AI assisted ZFS rewrite?

1•reacharavindh•28m ago•1 comments

Aiseesoft Anock for Mac

https://www.aiseesoft.com/pads/anock-for-mac.xml
1•mobieark•29m ago•0 comments

Search engine aggregator with a comprehensive plugin/extension system

https://github.com/degoog-org/degoog
1•Nature6509•31m ago•0 comments

UK's small power plants face higher cyber risk into 2030s – Iran-linked hack

https://www.theguardian.com/business/2026/aug/27/uk-small-power-plants-risk-cyber-attacks-iran-hack
2•lifeisstillgood•34m ago•0 comments

Write All the Things

https://asbedb.dev/musings/write-all-the-things
2•donksank•34m ago•0 comments

Show HN: A free 16-point check for how AI assistants see your website

https://checker.visiblebyagents.com/self-check.html
1•visiblebyagents•35m ago•0 comments

Lonewolf 0.2 – A standalone XMPP server written in Rust

https://github.com/lonewolf-im/lonewolf/releases/tag/v0.2.0
1•ortuman•36m ago•0 comments

Discord to let search engines index public server messages

https://www.bleepingcomputer.com/news/security/discord-to-let-search-engines-index-public-server-...
2•Smith-7831•37m ago•0 comments

Ask HN: Techniques for productive AI use in the workspace

4•MiiMe19•38m ago•0 comments

Native Shell: native UI framework in Rust for mobile, desktop and web

https://github.com/longbridge/nsh
2•0x1997•39m ago•1 comments

Cuba is skipping its November 1, 2026 clock change and staying on DST until 2027

https://www.timeanddate.com/news/time/cuba-keeps-dst-until-nov-2027.html
25•n_plus_1_acc•48m ago•24 comments

Show HN: Find hidden technical issues across client websites

https://gotrama.com
1•emmanuelyaks•49m ago•0 comments

EvilQwen

https://jacquesmattheij.com/evilqwen.png
1•jacquesm•52m ago•1 comments

Local-first means three different things

https://hologram.page/blog/local-first-means-three-different-things
2•lawik•54m ago•0 comments

Open Agent Primitives: run enterprise AI agents securely

https://openap.org
1•emreb•56m ago•0 comments

Between Fact and Fiction: unlock the void energy

https://zenodo.org/records/23629786
1•AbdulrahmanAhme•59m ago•0 comments

Everything I know about AI regulation I learned from music videos

https://www.technollama.co.uk/everything-i-know-about-ai-regulation-i-learned-from-music-videos
2•slyall•59m ago•0 comments

Australia Bans AI 'Emotional Intimacy' with Children;

https://dsrupt.news/articles/australia-bans-ai-emotional-intimacy-with-children-chatbot-makers-wi...
2•zippiest•1h ago•0 comments