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

Comments

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

The VAT refund is one of the greatest legal scams ever perpetrated

https://community.ricksteves.com/travel-forum/packing/vat-refunds-28591d59-d73c-4635-b13e-333ad97...
1•wslh•2m ago•0 comments

Show HN: Microsoft Agent Viewer

https://acs-viewer.pages.dev/
1•ellg•5m ago•0 comments

Show HN: AIs debating the same question – they disagree on everything

https://www.usecouncil.app/
1•jonnyhere•6m ago•1 comments

FreshRSS and BPC – Fetch full content from paywalled sites in FreshRSS with BPC

https://github.com/yuyangchee98/freshrss-bpc
1•yongyongyong•10m ago•0 comments

Ask HN: Good uses cases for Fabrice's microquickjs

1•fud101•18m ago•0 comments

A Big Fight over a Small Language in the Swiss Alps: a Plan to Tidy Up Romansh

https://www.newyorker.com/magazine/2025/12/08/a-very-big-fight-over-a-very-small-language
1•bookofjoe•21m ago•1 comments

New image sensor breaks optical limits [pdf]

https://phys.org/news/2025-12-image-sensor-optical-limits.pdf
1•sans_souse•27m ago•0 comments

Linus - kernel copyright licence covers software, does not extend to hardware

https://social.kernel.org/notice/B1aR6QFuzksLVSyBZQ
1•transpute•36m ago•0 comments

Motor powers prototype in-wheel electric powertrain system

https://www.electrichybridvehicletechnology.com/news/record-breaking-motor-powers-prototype-in-wh...
1•geox•37m ago•0 comments

Bridge Anonymization

https://github.com/elanlanguages/bridge-anonymization
1•handfuloflight•37m ago•0 comments

Why Taylor Swift's Frequent Flights Probably Won't Give Her Cancer

https://duncansnotes.substack.com/p/cosmic-radiation-at-10000-feet-why
2•laserduck•38m ago•1 comments

Production-Ready Speculative Decoding Models and Framework

https://lmsys.org/blog/2025-12-23-spec-bundle-phase-1/
1•gmays•38m ago•0 comments

Authenticating SSH Sessions with Secure Enclave

https://ewpratten.com/blog/ssh-secure-enclave
1•ewpratten•40m ago•1 comments

Selling Cool Domain

https://imtalking.com
1•nachoag7•44m ago•0 comments

Show HN: Kling Motion Control – Precise Motion Transfer from Video to Character

https://www.klingmotion.com/?i=d1d5k
2•lu794377•48m ago•0 comments

Advent of Code 2025: Haskell Solution Reflections for All 12 Days

https://blog.jle.im/entry/advent-of-code-2025.html
2•todsacerdoti•49m ago•0 comments

Love Actually is around Heathrow

https://www.heathrow.com/latest-news/love-actually-is-all-around-at-heathrow-airport
3•susam•57m ago•0 comments

Stock Success Predictor – FinSight AI

https://buy.stripe.com/6oUfZi6Xd51XeL3bxP9EI00
2•HyperScaler•1h ago•0 comments

I Built Cursor for Marketing Emails

https://www.sequenzy.com
2•nikpolale•1h ago•1 comments

A movie-like Music Video built using AI

https://www.youtube.com/watch?v=SvfCvAdxKew
1•fagnerbrack•1h ago•1 comments

China manga convention bars Japanese content amid political tensions

https://english.kyodonews.net/articles/-/67449
3•anigbrowl•1h ago•3 comments

Show HN: Calclock, Countdown/Lifeclock, Configurable

https://thysys.com/happy-new-year.html
1•HocusLocus•1h ago•0 comments

The Next-Gen Mainboard Designed with AmigaOS4 and MorphOS in Mind

https://mirari.vitasys.nl/our-story/
1•todsacerdoti•1h ago•0 comments

The Illusion of Political Independence

https://www.mdpi.com/3042-8084/1/1/3
2•PaulHoule•1h ago•0 comments

Claude-How To

https://github.com/luongnv89/claude-howto
2•handfuloflight•1h ago•0 comments

VidScore AI: Analyze your videos before you post

https://apps.apple.com/us/app/vidscore-ai-viral-analytics/id6756249746
2•gavfaro•1h ago•1 comments

Ask HN: How many HN'ers Celebrate Christmas vs. ?

7•gist•1h ago•8 comments

Coding Snake in Functional JavaScript (2018) [video]

https://www.youtube.com/watch?v=poVMBGe1THE
1•howToTestFE•1h ago•0 comments

Ask HN: How can anyone be confident in investor meetings?

2•junkaccount•1h ago•1 comments

Librarians Tired of Being Accused of Hiding Secret Books That Were Made Up by AI

https://gizmodo.com/librarians-arent-hiding-secret-books-from-you-that-only-ai-knows-about-200069...
6•vitalnodo•1h ago•3 comments