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

Comments

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

Thinking Like Transformer

https://srush.github.io/raspy/
1•vinhnx•4m ago•0 comments

Australian man jailed for selling US cyber secrets to Russian broker

https://www.abc.net.au/news/2026-02-25/australian-sentenced-7-years-jail-selling-us-trade-secrets...
1•defrost•6m ago•0 comments

Is Embedded Rust Ready for Primetime?

https://shawnhymel.com/3197/is-embedded-rust-ready-for-primetime/
1•sohkamyung•6m ago•0 comments

Claude Code Front End Design Toolkit

https://github.com/wilwaldon/Claude-Code-Frontend-Design-Toolkit
1•stagezerowil•7m ago•0 comments

Tests Are the New Moat

https://saewitz.com/tests-are-the-new-moat
1•linolevan•8m ago•0 comments

Show HN: Measuring brand share in AI answers – a Y Combinator case study

https://www.geovector.ai/report/yc
2•roman10•13m ago•2 comments

Show HN: Courtyard – Open-source macOS app for local MLX fine-tuning Text

https://github.com/Mcourtyard/m-courtyard
1•tuwenbo0120•15m ago•0 comments

Anthropic faces Friday deadline in Defense AI clash with Hegseth

https://www.cnbc.com/2026/02/24/anthropic-ai-hegseth-spying-defense.html
3•gslin•22m ago•0 comments

Looking Forward to PGConf India in Bengaluru in March

https://techcommunity.microsoft.com/blog/adforpostgresql/microsoft-at-pgconf-india-2026/4496182
1•clairegiordano•24m ago•0 comments

Canva expands professional creative ecosystem with Cavalry

https://www.canva.com/newsroom/news/cavalry/
1•flashblaze•26m ago•0 comments

Can you reverse engineer our neural network?

https://blog.janestreet.com/can-you-reverse-engineer-our-neural-network/
1•jsomers•29m ago•0 comments

Intel Strikes Deal with a Chip Startup Its CEO Invested In

https://www.nytimes.com/2026/02/24/technology/intel-sambanova-ceo-lip-bu-tan.html
2•osnium123•31m ago•0 comments

MBC v0.2.0 – AI agent orchestration for Laravel (security hardening)

https://github.com/etazza2025/laravel-mbc
1•undergracelabs•33m ago•1 comments

Learning from Structure: Discord's Entity-Relationship Embeddings

https://discord.com/blog/learning-from-structure-discords-entity-relationship-embeddings
1•throwaway314155•36m ago•0 comments

An Elephant Is Blind Without the Hairs on Its Trunk

https://www.nytimes.com/2026/02/12/science/elephant-whiskers.html
1•bookofjoe•37m ago•1 comments

RFC Explorer – Explore over 9000 RFCs

https://rfcexplorer.net/
1•xillb•37m ago•0 comments

We Need to Stop Asking "Is This Better Than That"

https://doppelgangerdev.com/docs/software-isn-t-a-competition-it-s-a-map-of-our-frustrations
1•asernasr•41m ago•1 comments

Show HN: Built a news aggregator that collect AI news around the world

https://vvsearch.com/workspace/news-terminal
1•raugen•45m ago•0 comments

Will artificial snow save the ski industry in the long run, or curse it?

https://theconversation.com/will-artificial-snow-save-the-ski-industry-in-the-long-run-or-curse-i...
1•PaulHoule•45m ago•0 comments

Finding 100 Kernel Bugs Using Agent Swarms

https://ydinkin.substack.com/p/200-kernel-bugs-in-30-days
1•itkeman•46m ago•0 comments

Show HN: I made a 4D version of DOOM

https://hyperhell.itch.io/hyperhell
1•chronolitus•46m ago•0 comments

Tim Cook Warned by CIA That China Could Move on Taiwan by 2027

https://www.macrumors.com/2026/02/24/tim-cook-warned-by-cia-china-taiwan-2027/
5•mgh2•48m ago•1 comments

Show HN: Declare AI – open standard for AI content disclosure

https://declare-ai.github.io/declare-ai/declare-ai-devteam.html
1•BetterToBest•48m ago•2 comments

Apple Set a European iPhone Sales Record Last Year

https://www.macrumors.com/2026/02/24/apple-european-iphone-sales-record-2025/
1•mgh2•48m ago•0 comments

Show HN: Limits – Control layer for AI agents that take real actions

https://limits.dev
7•thesvp•48m ago•0 comments

Build a free job-winning resume and cover letter in minutes

https://resumecv.pro
1•pivlu•51m ago•1 comments

Data center outlook: half of 2026 pipeline may not materialize

https://www.sightlineclimate.com/research/data-center-outlook
1•toomuchtodo•53m ago•0 comments

Western Digital Sold Out All 2026 Hard Drive Production as AI Centers Scramble

https://247wallst.com/investing/2026/02/18/western-digital-sold-out-all-2026-hard-drive-productio...
2•vmg12•53m ago•0 comments

Being a Luddite Is Cool, but Have You Seen the Tapestries New Looms Are Making?

https://www.mcsweeneys.net/articles/being-a-luddite-is-cool-and-all-but-have-you-seen-the-hilario...
2•stmw•57m ago•0 comments

Show HN: Claude Automation Toolkit – 6 Python scripts for AI task automation

https://github.com/indoor47/summarize-docs
1•adamrunboy•58m ago•0 comments