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.

Old.reddit.com Stops Working

https://old.reddit.com/r/emacs
1•snfernandez•1m ago•1 comments

They don't make 'em like Sublime Text anymore

https://dbushell.com/2026/08/07/sublime-text/
1•Curiositry•2m ago•0 comments

Propaganda of the deed

https://en.wikipedia.org/wiki/Propaganda_of_the_deed
1•petethomas•5m ago•0 comments

Hyperspace

https://hypercritical.co/hyperspace/
2•swyx•10m ago•0 comments

I wrote my book by hand

https://augustlamm.substack.com/p/i-wrote-my-book-by-hand
2•herbertl•11m ago•0 comments

Claude will watermark AI-generated text and images

https://tokenstead.ai/
2•cdnsteve•11m ago•0 comments

In Arizona, it may be easier to steal a home than a TV as deed fraud grows

https://www.usatoday.com/
1•rawgabbit•13m ago•0 comments

Recycle – Floppydisks

https://www.floppydisk.com/recycle
2•calvinmorrison•14m ago•0 comments

Another August

https://kellykeene.blog/2026/08/01/another-august/
1•wawayanda•18m ago•0 comments

Chinese rocket explodes shortly after liftoff

https://www.space.com/space-exploration/launches-spacecraft/chinese-rocket-explodes-less-than-90-...
1•glimshe•19m ago•0 comments

Japanese government announces measures against mega-solar projects

https://twitter.com/takaichi_sanae/status/2086977599130194229
1•anigbrowl•20m ago•0 comments

ChatGPT to Markdown: export any chat [video]

https://www.youtube.com/watch?v=TXPMnpUxab4
2•quysala147258•22m ago•2 comments

eBay scammer took $600 from me; eBay suggests cotton-candy flavor energy drinks

https://www.reddit.com/r/Wellthatsucks/s/si0ksx7ceI
1•rogerrogerr•26m ago•0 comments

Attackers Can Steal Enterprise Data with One Click Through Atlassian Rovo Flaw

https://www.kobaran.com/attackers-can-steal-enterprise-data-with-one-click-through-atlassian-rovo...
1•supportm•27m ago•0 comments

Building a Pure-Rust, Sandboxed, Local-First Browser for Agents

https://www.reddit.com/r/codex/comments/1vl404k/purerust_sandboxed_localfirst_browser_for_agents/
2•syumei•28m ago•0 comments

Show HN: SendPage – turn AI-generated HTML into a shareable link

https://sendpageapp.com
2•jack714•31m ago•0 comments

We Built Linear Agent

https://linear.app/now/how-we-built-linear-agent
1•cristinacordova•36m ago•0 comments

Canada Is Building a Surveillance State via 5 Bills

https://x.com/lucyhargreaves4/article/2066903272271544551
4•vancouvermatt•37m ago•0 comments

New Claude model improves lower bound on problem linked to Reimann hypothesis

https://marqr.codes/u3bno
1•ajax33•38m ago•2 comments

Sprout – easily build an app with AI, share it, and use other apps

https://sprout.monkeyai.io/
1•davidk2yang•46m ago•1 comments

Antirez/h3.c: MiniMax H3 inference engine for Mac computers

https://github.com/antirez/h3.c
2•swyx•53m ago•0 comments

Show HN: Insidedb, an interactive, animated explainer of database internals

https://david-g-3654.github.io/insidedb/
2•davai-g•55m ago•0 comments

Show HN: Sketchling – a hand-drawn animation language for coding agents

https://github.com/AnayGarodia/sketchling
1•ag5250•57m ago•0 comments

Predicting AI Job Exposure

https://www.ben-evans.com/benedictevans/2026/5/24/ai-job-exposure
1•fagnerbrack•58m ago•0 comments

Reorgs Happen

https://ben.balter.com/2026/06/07/reorgs-happen/
3•fagnerbrack•58m ago•0 comments

Compensation Bands and Promotions

https://molochinations.substack.com/p/compensation-bands-and-promotions
2•fagnerbrack•59m ago•0 comments

Google's AI Team Tells Job Seekers Its HR Filters Are Unreliable

https://www.bloomberg.com/news/articles/2026-08-10/google-s-ai-team-tells-job-seekers-its-hr-filt...
3•htrp•1h ago•1 comments

Show HN: Linejudge – an independent verification harness for coding agents

https://github.com/phillipmex/linejudge
1•phillipmex•1h ago•0 comments

Show HN: Airship – Figma-Like Visual Editor for Claude Code, Codex and OpenCode

https://github.com/0xnyn/airship
1•0xnyn•1h ago•0 comments

A Lost Civilization Is Baffling Experts and Rewriting China's Origin Story

https://www.wsj.com/world/china/a-lost-civilization-is-baffling-experts-and-rewriting-chinas-orig...
6•bookofjoe•1h ago•1 comments