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

Comments

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

Manifold Resonance vs. Transformer: Efficiency Audit

https://github.com/MrPan2048/GeometricTransformer/blob/main/bytefight.md
1•MrPan•7m ago•0 comments

New Dietary Guidelines – No. Just No

https://vegancurator.com/blog/new-dietary-guidelines-just-no
1•plastkfantastik•9m ago•0 comments

The Panchatantra: The ancient 'viral memes' still with us (2018)

https://www.bbc.com/culture/article/20180517-the-panchatantra-the-ancient-viral-memes-still-with-us
1•1659447091•15m ago•0 comments

Germany Forces Lexus to Remotely Kill Car Heating in Dead of Winter

https://www.gadgetreview.com/germany-forces-lexus-to-remotely-kill-car-heating-in-dead-of-winter
1•josephcsible•18m ago•0 comments

Rugs of War

https://rugsofwar.wordpress.com/
1•dmbche•24m ago•0 comments

Ask HN: How does YC / HN think about founder voting splits vs. equity splits?

2•cofounder1999•25m ago•0 comments

How long would you survive with no DNA? [video]

https://www.youtube.com/watch?v=s3oLIDaElaE
1•surprisetalk•27m ago•0 comments

Fundamental Engineering Principles

https://blog.tdhttt.com/post/fundamental-engineering-principles/
1•tdhttt•30m ago•0 comments

Canada's Prime Minister Mark Carney's Full Speech at Davos

https://www.cbc.ca/news/politics/mark-carney-speech-davos-rules-based-order-9.7053350
2•qkeast•31m ago•1 comments

Machine with Concrete – Arthur Ganson [video]

https://www.youtube.com/watch?v=5q-BH-tvxEg
1•o4c•32m ago•0 comments

DevOps Didn't Fail – We Just Gave It the Tools It Deserved

https://devops.com/devops-didnt-fail-we-just-finally-gave-it-the-tools-it-deserved/
1•milkglass•34m ago•0 comments

Libbbf: Bound Book Format, A high-performance container for comics and manga

https://github.com/ef1500/libbbf
3•zdw•37m ago•0 comments

Google Health AI Overviews Cite YouTube More Than Any Hospital Site

https://www.searchenginejournal.com/google-health-ai-overviews-cite-youtube-more-than-any-hospita...
2•randycupertino•44m ago•0 comments

OpenFlexure Microscope

https://openflexure.org/projects/microscope/
1•o4c•47m ago•1 comments

A series of distributed systems challenges brought to you by Fly.io

https://fly.io/dist-sys/
3•meistro•49m ago•0 comments

I got into an argument on Discord about how inefficient CBR/CBZ is, so I wrote

https://old.reddit.com/r/selfhosted/comments/1qi64pr/i_got_into_an_argument_on_discord_about_how/
3•todsacerdoti•53m ago•0 comments

Virology Lectures 2025 [video]

https://www.youtube.com/watch?v=3pX0x3mC4Io&list=PLGhmZX2NKiNm2iEUtVslIUHTW9i2zAG72
2•shpx•54m ago•0 comments

Drift

https://github.com/dadbodgeoff/drift
1•handfuloflight•55m ago•0 comments

Using RL to Double an Agent's Effectiveness in Production Debugging

https://www.dbow.me/rl.html
4•anyekwest•1h ago•0 comments

Show HN: DoceraX – Open "Please wait cannot display this document" PDFs Mac

http://fastHNReader.com
1•coolwulf•1h ago•0 comments

Can AI Pass Freshman CS? [video]

https://www.youtube.com/watch?v=56HJQm5nb0U
1•thethirdone•1h ago•1 comments

Explore medieval life and death with these 5 fun interactive maps (2023)

https://weirdmedievalguys.substack.com/p/explore-medieval-life-and-death-with
1•crescit_eundo•1h ago•0 comments

Migrating 13,000 Comments from Drupal to Hugo

https://www.jeffgeerling.com/blog/2026/migrating-13000-comments-from-drupal-to-hugo/
2•zdw•1h ago•0 comments

An 800 year old prayer book that's decorated with puns (2023)

https://weirdmedievalguys.substack.com/p/an-800-year-prayer-book-thats-decorated
3•crescit_eundo•1h ago•0 comments

Air Force One Returns to Joint Base Andrews After 'Minor Electrical Issue'

https://www.wsj.com/livecoverage/greenland-trump-tariffs-trade-eu/card/air-force-one-returns-to-j...
6•thm•1h ago•1 comments

How Birds Got Human Names (2025)

https://weirdmedievalguys.substack.com/p/how-birds-got-human-names
1•crescit_eundo•1h ago•0 comments

Why Not Tail Recursion?

https://futhark-lang.org/blog/2026-01-20-why-not-tail-recursion.html
2•todsacerdoti•1h ago•0 comments

Incremental AI Adoption for E-Commerce – Arcturus Labs

http://arcturus-labs.com/blog/2026/01/18/incremental-ai-adoption-for-e-commerce/
1•JnBrymn•1h ago•0 comments

Everything Moe

https://ianbarber.blog/2026/01/20/everything-moe/
1•phpencil•1h ago•0 comments

Shingles vaccine may help keep older people biologically younger

https://www.thetimes.com/uk/science/article/shingles-vaccine-news-bz55zstn5
7•ValentineC•1h ago•1 comments