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•11mo ago

Comments

zoezoezoezoe•11mo 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•11mo 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.

We Are in This Together

https://elijahpotter.dev/articles/we-are-in-this-together
1•chilipepperhott•44s ago•0 comments

Ford CEO warns Chinese cars in US would be 'devastating' to US automakers

https://nypost.com/2026/04/14/business/ford-ceo-jim-farley-warns-chinese-cars-sales-in-us-would-b...
1•testing22321•1m ago•0 comments

Amazon sellers boycott ads in policy change revolt

https://www.cnbc.com/2026/04/15/amazon-sellers-boycott-ads-payment-changes.html
2•ilamont•3m ago•0 comments

Hnterm

https://terminaltrove.com/hnterm/
1•rolph•4m ago•0 comments

Hacker News CLI

https://pythonhosted.org/hackernews-cli/commands.html
1•rolph•5m ago•0 comments

The Dynamics of Competition in Search Engines (2001)

https://www.tesble.com/10.1016/s0167-7187(01)00065-0
1•highfrequency•5m ago•0 comments

Claude Code alternative: same output quality, 10x less input tokens used

https://github.com/Simon-Free/bouzecode
1•sfreyb•6m ago•1 comments

Explosions as one of Australia's two oil refineries erupts in flames

https://www.abc.net.au/news/2026-04-16/geelong-corio-refinery-fire/106569692
1•msuniverse2026•7m ago•1 comments

Open-Source Agent That Teaches Claude Code Your Architecture – Jonno.nz

https://jonno.nz/posts/open-source-agent-that-teaches-claude-code-your-architecture/
1•jonno-nz•7m ago•0 comments

HealthAdminBench: AI Agents Can Diagnose, but Can They Handle Your Insurance?

https://kineticsystems.ai/blog/healthadminbench-automating-healthcare-administration-with-compute...
1•lalaland1125•8m ago•0 comments

Rust should have stable tail calls

https://trifectatech.org/blog/tail-calls-project-goal/
1•adamnemecek•9m ago•0 comments

I used Claude to build a free alternative to TextExpander

https://typefire.app
1•navbuildz•10m ago•0 comments

Magi: Multi-Agent GVisor Isolation

https://gvisor.dev/blog/2026/04/15/magi-multi-agent-gvisor-isolation/
2•eperot•11m ago•1 comments

Recursive self-improvement is possible for apps, too

https://www.codecanary.ai/blog/recursive-self-improvement-is-possible-for-apps
4•brendanashworth•13m ago•0 comments

Building an Electric Wind-Up Plane

https://www.youtube.com/watch?v=-4X6KYlQ7YQ
1•tantalor•15m ago•0 comments

Let Sleeping CPUs Lie – S0ix

https://freebsdfoundation.org/our-work/journal/browser-based-edition/laptop-desktop/let-sleeping-...
2•rbanffy•18m ago•0 comments

Apple-like QoS for processes proposed for Linux

https://www.phoronix.com/news/Linux-Sched-QoS-v0.1
2•titaniumtown•18m ago•0 comments

ChatGPT for Excel

https://chatgpt.com/apps/spreadsheets/
2•armcat•19m ago•0 comments

Beyond the Mountains, More Mountains

https://effusion.substack.com/p/beyond-the-mountains-more-mountains
1•notallm•19m ago•0 comments

A New Kind of Hybrid Car Is About to Hit America's Streets

https://www.theatlantic.com/technology/2026/04/extended-range-electric-vehicle-pickup-trucks/686811/
3•JumpCrisscross•21m ago•1 comments

Interpreting Negation in GPT-2: Layer- and Head-Level Causal Analysis

https://arxiv.org/abs/2603.12423
1•PaulHoule•23m ago•0 comments

Offers new docking adapter for large space stations – SpaceNews

https://spacenews.com/vast-offers-new-docking-adapter-for-large-space-stations/
1•rbanffy•24m ago•0 comments

Universe Expanding Faster Than Expected

https://www.vice.com/en/article/scientists-figured-out-how-fast-the-universe-is-expanding-but-the...
1•leecoursey•24m ago•0 comments

Smoglandia: We haven't always been smoggy, but we're built that way

https://www.latimes.com/california/story/2026-03-26/smoglandia-we-havent-always-been-smoggy-but-w...
1•PaulHoule•27m ago•0 comments

Ask HN: What's your experience working at xAI as an AI tutor?

1•xai-tutor•27m ago•0 comments

Physicists think they've resolved the proton size puzzle

https://arstechnica.com/science/2026/04/physicists-think-theyve-resolved-the-proton-size-puzzle/
4•rbanffy•29m ago•0 comments

Hermes Agent Self-Evolution System: A Detailed Similarity Analysis with Evolver

https://evomap.ai/blog/hermes-agent-evolver-similarity-analysis
1•tamnd•29m ago•0 comments

Sony Music vs. Udio over stream ripping from YouTube to train AI model [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.nysd.623701/gov.uscourts.nysd.623701.156.0.pdf
2•ChrisArchitect•30m ago•0 comments

Mirax Trojan, spreads via Meta ads, infected 220k users so far

https://securityaffairs.com/190842/uncategorized/mirax-malware-campaign-hits-220k-accounts-enable...
2•lschueller•30m ago•0 comments

LIV Golf Facing Imminent Closure as Saudi Backers Weigh Pulling Funding

https://www.wsj.com/sports/golf/liv-golf-saudi-funding-e7c19130
2•JumpCrisscross•35m ago•0 comments