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.

AI to Kids by Letting Them Tweak Local Chatbots [video]

https://www.youtube.com/watch?v=fNkt41q7eqs
1•dbreunig•15m ago•0 comments

Rsync 3.5 Released as "Extraordinary" Update to Fix 33 Security Issues

https://www.phoronix.com/news/Rsync-3.5
1•Bender•15m ago•0 comments

Long Story Short: Daily word game

https://gizmodo.com/long-story-short-wants-to-be-the-wordle-of-editing-bad-sentences-2000797842
1•akashwadhwani35•17m ago•0 comments

General Dynamics Failed to Build Artillery Shells for the Army

https://www.propublica.org/article/general-dynamics-artillery-factory-failed
2•colinprince•20m ago•0 comments

Is Bending Spoons Good for Startups?

https://s-1.vercel.app/posts/bending-spoons-a-capital-cycle-play/
2•Altaba•20m ago•0 comments

Show HN: UTC Time - live clock, ISO 8601, Unix timestamp

https://utctime.app/
1•nadermx•25m ago•0 comments

DeepSeek V4 Pro 0813: Intelligence, Performance and Price Analysis

https://artificialanalysis.ai/models/deepseek-v4-pro
1•theanonymousone•26m ago•0 comments

Install Manticore Search with one command

https://medium.com/@s_nikolaev/install-manticore-search-with-one-command-8ab5ba07a06b
1•snikolaev•31m ago•0 comments

Specula: Scaling formal specs for autonomous model checking of system code

http://muratbuffalo.blogspot.com/2026/08/specula-scaling-formal-specifications.html
1•matt_d•34m ago•0 comments

16GB EGPU for AI Inference, $699

https://www.amazon.com/GIGABYTE-Graphics-128-bit-Server-Grade-Thunderbolt/dp/B0GKFHSPN8
2•shrubble•35m ago•3 comments

Show HN: I asked Claude to write DDIA as a live comic

https://systemscomic.com/ddia/read
2•samuelxing•36m ago•0 comments

How the smiley face was born

https://www.history.com/articles/smiley-face-history
2•inatreecrown2•40m ago•0 comments

Edge is dropping older extensions(Manifest V2), affecting popular privacy tools

https://www.malwarebytes.com/blog/news/2026/08/edge-is-dropping-older-extensions-affecting-popula...
5•BearBest•46m ago•0 comments

You're Absolutely Right

https://www.lesswrong.com/posts/u8TdDutDyaSxG76hn/you-re-absolutely-right
1•LinchZhang•58m ago•1 comments

Show HN: Rule-lite – Tiny dependency-free TS engine for JSON conditional rules

https://github.com/tejas821/rule-lite
1•tejas821•58m ago•0 comments

From assistance to execution: How enterprises put AI to work

https://openai.com/index/how-enterprises-put-ai-to-work/
2•vcfgdev•1h ago•0 comments

A unified CLI for native OS keychains – x keyring

https://www.x-cmd.com/blog/260811/
1•Zhengqbbb•1h ago•0 comments

OpenLiving - A data center you can live in [video]

https://www.youtube.com/watch?v=BwkBXNOPa_w
1•inatreecrown2•1h ago•0 comments

Pixel Watch 5 adds a feature Apple Watch desperately needs

https://www.cultofmac.com/news/pixel-watch-5-insulin-resistance-trends
4•ValentineC•1h ago•1 comments

Examples for use of AI and especially LLMs in major mathematical developments

https://mathoverflow.net/questions/502120/examples-for-the-use-of-ai-and-especially-llms-in-major...
1•vismit2000•1h ago•0 comments

Show HN: Agent Memory Leaderboard – first public results for AI memory systems

https://agentmemoryleaderboard.ai/leaderboard/academic/textual
2•IreneAI•1h ago•0 comments

SLAC: CPU-to-GPU Side-Channel Attacks via System-Level Cache on Apple Silicon

https://arxiv.org/abs/2608.09075
3•sbulaev•1h ago•0 comments

Clamiga: Common Lisp for the Amiga

https://nnamgreb.de/blog/Clamiga+-+Common+Lisp+for+the+Amiga
3•emptybits•1h ago•0 comments

Dart 3.13

https://dart.dev/blog/announcing-dart-3-13
2•wstrange•1h ago•0 comments

Show HN: I'm tired replying my social media visitors, I let AI agent handle it

https://www.agle.app/
1•tapriliando•1h ago•0 comments

Notation as a Tool of Thought (1980)

https://www.jsoftware.com/papers/tot.htm
2•colinprince•1h ago•0 comments

Tech adds phone tracking to license plate readers, associating devices with cars

https://theconversation.com/new-tech-adds-phone-tracking-to-license-plate-readers-associating-dev...
9•asdefghyk•1h ago•1 comments

Two weeks later and Adsense is still serving up Scareware

https://bsky.app/profile/redbluething.bsky.social/post/3mswnjfufs22v
2•redbluething•1h ago•0 comments

'Near-autonomous' AI agents attack Taiwan's nuclear safety agency

https://www.theregister.com/security/2026/08/12/near-autonomous-ai-agents-attack-taiwans-nuclear-...
5•Bender•1h ago•0 comments

Tailscale says deeply buried 16-year-old SQLite bug caused last year's outages

https://www.theregister.com/databases/2026/08/12/tailscale-says-deeply-buried-16-year-old-sqlite-...
4•Bender•1h ago•0 comments