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

Comments

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

Git read-tree: Carbon-Copy without Merge Hell

https://blog.zenosmosis.com/posts/5-git-read-tree/
1•rustic-indian•5m ago•1 comments

Id Software was Lazy – DOOM could have had PC Speaker Music

https://lenowo.org/viewtopic.php?t=45
1•minki_the_avali•8m ago•0 comments

Ask HN: Do you think you have your location services on?

1•jacquesm•9m ago•0 comments

Ivan Sutherland Sketchpad Demo 1963 [video]

https://www.youtube.com/watch?v=6orsmFndx_o
1•fs_software•14m ago•0 comments

AI Mathematical Olympiad – Progress Prize 3

https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3
1•kristianp•15m ago•0 comments

MADvent – A Math and Logic Advent Calendar for Your Kids

https://madvent.amithm.ca/about
1•amitpm•16m ago•1 comments

Noodl.ist

https://jetgirl.art/introducing-noodlist/
1•jetgirl•16m ago•0 comments

Agents need good developer experience too

https://modal.com/blog/agents-devex
1•birdculture•17m ago•0 comments

Richard Feldman, "New Ways to Roc" [video]

https://www.youtube.com/watch?v=VnPw9rk8FI8
1•stephdin•18m ago•0 comments

Show HN: A "what-if" budget planner app born from new-parent chaos

https://planstheapp.com
1•riario•18m ago•0 comments

Helping Agents Debug Webapps

https://blog.fsck.com/2025/12/02/helping-agents-debug-webapps/
1•Ch00k•20m ago•0 comments

Oracle Credit Fear Gauge Hits Highest Since 2009 on AI Bubble Fears

https://www.bloomberg.com/news/articles/2025-12-02/oracle-credit-fear-gauge-hits-highest-since-20...
1•petethomas•21m ago•0 comments

Honduran ex-president released from US prison after Trump pardon

https://www.bbc.com/news/articles/cpvdr8k7xjro
2•wslh•27m ago•0 comments

H-1B to Plan B: India's top tech talent looks beyond the U.S.

https://restofworld.org/2025/india-tech-talent-diversifies-beyond-us/
1•nanfinitum•29m ago•0 comments

Comparison of Waymo Rider-Only crash rates by crash type to human benchmarks

https://www.tandfonline.com/doi/full/10.1080/15389588.2025.2499887
1•agnosticmantis•32m ago•0 comments

Rebinding for Observer-Safe Information Design

https://rebinding.is/
1•isaacbowen•36m ago•0 comments

Ask HN: Which web browser are you using and why?

4•throwaway81998•37m ago•5 comments

Claude the albino alligator in Cal Academy passed away at age 30

https://www.calacademy.org/press/releases/claude-the-albino-alligator-passes-away-at-age-30
2•elinear•40m ago•0 comments

Claude Died

https://abc7news.com/post/cal-academy-announces-beloved-claude-albino-alligator-has-died-30/18241...
12•jumploops•43m ago•3 comments

Cloth Simulation

https://cloth.mikail-khan.com/
1•adamch•43m ago•0 comments

Show HN: Build CLI apps with Ink that run in the browser

https://www.ink-web.dev/
2•thoughtfulchris•45m ago•0 comments

Time Became Money: Clocks, Capitalism and Wealth

https://www.ft.com/content/696d9ced-9022-49bc-9cd9-501fce897146
2•skx001•48m ago•0 comments

The FY26 NDAA: The Critical Power Pivot in Strategy, Silicon, and Steel

https://nerdrums.com/inside-the-fy26-ndaa/
2•Justin_N•50m ago•1 comments

LST-1 follow-up of the exceptionally bright gamma-ray burst GRB 221009A

https://arxiv.org/abs/2512.01747
1•belter•50m ago•0 comments

The Most Common Signs of a Heart Attack

https://www.nytimes.com/2025/10/10/well/common-signs-heart-attack.html
1•brandonb•52m ago•1 comments

Waymo hits a dog in San Francisco, reigniting safety debate

https://www.latimes.com/business/story/2025-12-02/waymo-strikes-dog-in-san-francisco-weeks-after-...
3•petethomas•54m ago•1 comments

Vintage Computing Christmas Challenge

https://logiker.com/Vintage-Computing-Christmas-Challenge-2025
2•varjag•54m ago•0 comments

Exploring Large HTML Documents on the Web

https://calendar.perfplanet.com/2025/exploring-large-html-documents-on-the-web/
8•zdw•55m ago•0 comments

Academic society bans Larry Summers for life over close ties to Jeffrey Epstein

https://apnews.com/article/larry-summers-harvard-jeffrey-epstein-bebad1142f859c15467ed010c08ea6fa
1•bikenaga•57m ago•0 comments

Windows 11 October 2025 Update Triggers Major Gaming Performance Regression

https://www.guru3d.com/story/windows-11-kb5066835-update-triggers-major-gaming-performance-regres...
8•d3Xt3r•59m ago•3 comments