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.

Claude Code Issue that important facts were forgotten when sessions were reseted

https://github.com/rkceve/Sanma
1•rkceve•26s ago•0 comments

Elevated error rates on Opus 4.7

https://status.claude.com/incidents/8z7l5zcy0v3b
1•rob•2m ago•0 comments

Interactive explorer for Bun's Rust migration

https://bun-to-rust-fanahova.zocomputer.io/
1•FanaHOVA•4m ago•0 comments

Build iterative repair loops with Codex

https://developers.openai.com/cookbook/examples/codex/build_iterative_repair_loops_with_codex
2•gmays•4m ago•0 comments

AI detected a person in the Blessed Sacrament

https://twitter.com/trad_west_/status/2055029902349598827
1•marcofloriano•6m ago•1 comments

From a Telegram conversation to verified AI agents in 49 days

https://credexai.live/hub
1•eedgerton•8m ago•0 comments

MCP Is Not Enough

https://mukulsingh105.github.io/articles/linkedin-article.html
2•azhenley•10m ago•0 comments

Show HN: Openvid – open-source cinematic screen recorder and mockup editor

https://github.com/CristianOlivera1/openvid
2•cristianolivera•11m ago•0 comments

June 9. Dead man switch and MS RCE drops promised?

https://deadeclipse666.blogspot.com/
2•throw2024•17m ago•1 comments

I built a live map for tracking military aircraft activity worldwide

https://skyrane.com/
3•Anaxader•21m ago•0 comments

We built a machine-readable merchant verification layer for AI shopping agents

https://github.com/warwickwood-cell/gengeo-agent-registry
2•gengeo-ai•32m ago•0 comments

Recursive Self-Improvement Delivers New SOTA Coding Performance

https://poetiq.ai/posts/recursive_self_improvement_coding/
7•icodestuff•33m ago•0 comments

Honda posts first annual loss on $9B EV writedown, scraps EV sales goals

https://www.reuters.com/business/autos-transportation/honda-books-first-annual-loss-hit-by-hefty-...
4•kristianp•36m ago•1 comments

What's in My Cert Kit?

https://blog.networkprofile.org/whats-in-my-cert-kit/
2•monstermunch•38m ago•0 comments

Accelerating Hamming Quasi-Cyclic (HQC) with Additive FFT

https://eprint.iacr.org/2026/014
1•teleforce•38m ago•0 comments

The real singularity is the friends we made along the way

https://geohot.github.io//blog/jekyll/update/2026/05/09/real-singularity.html
1•oliculipolicula•45m ago•0 comments

Raindrop – Local Agent Debugger

https://github.com/raindrop-ai/workshop
2•felixbraun•47m ago•0 comments

Windows BitLocker zero-day gives access to protected drives, PoC released

https://www.bleepingcomputer.com/news/security/windows-bitlocker-zero-day-gives-access-to-protect...
1•akyuu•47m ago•0 comments

LLM Policy for Rust Compiler

https://github.com/rust-lang/rust-forge/pull/1040
2•liyanage•47m ago•0 comments

LLMs run on top of an OS designed for code, not weights

https://github.com/matthewworner/spike
3•matthewworner•48m ago•0 comments

Sam Altman Is Taking a Lot of Punches on the Witness Stand

https://www.motherjones.com/politics/2026/05/altman-musk-openai-lawsuit-witness-questioning-ai/
5•cdrnsf•48m ago•0 comments

New Fragnesia Linux flaw lets attackers gain root privileges

https://www.bleepingcomputer.com/news/security/new-fragnesia-linux-flaw-lets-attackers-gain-root-...
2•akyuu•53m ago•0 comments

AMD EPYC CPUs Reach Record Server Revenue Share of 46.2%

https://www.techpowerup.com/349029/amd-epyc-cpus-reach-record-server-revenue-share-of-46-2
5•akyuu•57m ago•0 comments

Have a Coherent AI Policy

https://brianmeeker.me/2026/05/14/have-a-coherent-ai-policy/
9•ai_critic•1h ago•0 comments

Shareable AI Editable Visualizations

https://framejs.io/docs/intro.html
2•dionjw•1h ago•0 comments

Boeing, Toyota Donated $1M Each to Transportation Secretary's Road-Trip Show

https://www.wsj.com/business/boeing-toyota-donated-1-million-each-to-transportation-secretarys-ro...
5•impish9208•1h ago•2 comments

Decisions in the past have long running repercussions

https://www.distributedthoughts.org/2026-05-07-roman-bridge-still-determines-your-commute/
3•prosaic-hacker•1h ago•1 comments

A Professor in Every Pocket – A New Framework for Higher Education

https://lagomor.ph/2026/01/a-professor-in-every-pocket/
2•ChilledTonic•1h ago•0 comments

Isaac Newton on Laputa

https://www.historytoday.com/archive/great-debates/isaac-newton-laputa
2•hhs•1h ago•0 comments

mimalloc: A new, high-performance, scalable memory allocator for the modern era

https://www.microsoft.com/en-us/research/blog/mimalloc-a-high-performance-scalable-memory-allocat...
8•matt_d•1h ago•0 comments