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.

Japan's Cherry Blossom Database, 1,200 Years Old, Has a New Keeper

https://www.nytimes.com/2026/04/17/climate/japan-cherry-blossom-database-scientist.html
2•caycep•5m ago•0 comments

OSS code review, in the era of LLMs

https://blog.ezyang.com/2026/04/oss-code-review-in-the-era-of-llms/
1•matt_d•6m ago•0 comments

Free tool for WebP and SVG optimization. Privat data

https://axiomoverclock.ca/
1•altered_carbine•11m ago•1 comments

A private space company has a new plan to bag an asteroid

https://arstechnica.com/space/2026/03/a-private-space-company-has-a-radical-new-plan-to-bag-an-as...
2•PaulHoule•13m ago•0 comments

Show HN: AI agents should browse your site, not call your API

https://www.rtrvr.ai/rover/blog/four-architectures-website-ai-agents
1•quarkcarbon279•13m ago•0 comments

Maine Said No to New Data Centers. Other States Are Racing to Follow

https://www.motherjones.com/environment/2026/04/maine-ai-data-center-moratorium-ban-energy-grid/
2•cdrnsf•14m ago•0 comments

If you want into Anthropic's Claude club, you may have to show ID

https://www.theregister.com/2026/04/16/anthropic_claude_id_verification_persona/
1•Bender•14m ago•1 comments

Cisco Wi-Fi boxes are filling their disks with 5MB of undeletable data every day

https://www.theregister.com/2026/04/17/cisco_wifi_ap_useless_data/
1•Bender•15m ago•0 comments

Intel eases reliance on TSMC with 'Merica-made Core Series 3 processors

https://www.theregister.com/2026/04/17/intel_eases_reliance_on_tsmc/
1•Bender•16m ago•0 comments

Does the brain make its own DMT? New study ignites debate

https://refractor.io/psychedelics/brain-dmt-endogenous-consciousness/
1•breve•18m ago•0 comments

From Endless Frontier to Enemy of the People: The Assault on Public Science

https://www.lawfaremedia.org/article/from-endless-frontier-to-enemy-of-the-people--the-assault-on...
5•hn_acker•26m ago•0 comments

Show HN: codeburn-rs; CodeBurn but 600x faster in Rust [view coding token usage]

https://github.com/rossnoah/codeburn-rs
1•noah32•26m ago•0 comments

Post-quantum cryptography migration at Meta: Framework, lessons, and takeaways

https://engineering.fb.com/2026/04/16/security/post-quantum-cryptography-migration-at-meta-framew...
1•hhs•27m ago•0 comments

NASA's X-59 Completes First Wheels-Up Flight

https://www.nasa.gov/blogs/quesst/2026/04/15/nasas-x-59-shows-streamlined-profile-in-wheels-up-fl...
5•big_toast•28m ago•3 comments

Gmail label bridge on Claude Cowork just broke

1•mangoe•31m ago•1 comments

How to Develop a Career Path Framework in 10 Steps

https://effortbox.com/blog/how-to-develop-a-career-path-framework/
1•andreylangovoy•31m ago•0 comments

Proteus: Heterogeneous FPGA Virtualization [pdf]

https://dse.in.tum.de/wp-content/uploads/2026/03/proteus-eurosys-26.pdf
1•matt_d•32m ago•0 comments

How to Host a Blog on a Subdirectory Instead of a Subdomain

https://www.davidma.org/blog/2025-11-14-host-your-blog-on-a-subdirectory/
7•taikon•34m ago•2 comments

A win–lose mindset affects political and policy preferences

https://www.aeaweb.org/research/zero-sum-politics-us
3•neehao•35m ago•0 comments

Show HN: Cogveo–Schedule AI agents to run Python on your files and email results

https://cogveo.com
1•thrinz•37m ago•0 comments

Cerebras Files for IPO as Demand Surges for More Efficient AI Chips

https://www.wsj.com/tech/chip-startup-cerebras-files-for-initial-public-offering-4aa27ae3
2•JumpCrisscross•37m ago•0 comments

LibreShockwave – Open-source SDK, decompiler and web player for Adobe Shockwave

https://github.com/Quackster/LibreShockwave
1•giancarlostoro•38m ago•0 comments

Trevex: A Black-Box Detection Framework for Data-Flow Transient Execution Vulns

https://roots.ec/publications/weber2026trevex
1•matt_d•39m ago•0 comments

The Danger of "Modern" Open Source

https://fagnerbrack.com/the-danger-of-modern-open-source-c15dd5206346
2•birdculture•41m ago•0 comments

Who Is Blake Whiting?

https://theamericanscholar.org/who-is-blake-whiting/
3•Caiero•41m ago•1 comments

How to teach the same skill to different robots

https://actu.epfl.ch/news/how-to-teach-the-same-skill-to-different-robots-2/
2•hhs•42m ago•0 comments

How an LLM becomes more coherent as we train it

https://www.gilesthomas.com/2026/04/how-an-llm-becomes-more-coherent-over-training
1•gpjt•42m ago•0 comments

Seinfeld Is Unfunny

https://tvtropes.org/pmwiki/pmwiki.php/Main/SeinfeldIsUnfunny
1•theopsimist•43m ago•0 comments

CRYS-L – execution engine with 0 variance for critical systems, verify with curl

https://desarrollador.xyz/benchmark.html
1•condesi•44m ago•0 comments

Adversarial distillation

https://www.frontiermodelforum.org/issue-briefs/issue-brief-adversarial-distillation/
1•hhs•53m ago•0 comments