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.

Significant US Farm Losses Persist, Despite Federal Assistance

https://www.fb.org/market-intel/significant-farm-losses-persist-despite-federal-assistance
2•toomuchtodo•1m ago•1 comments

Internet voting is insecure and should not be used in public elections

https://blog.citp.princeton.edu/2026/01/16/internet-voting-is-insecure-and-should-not-be-used-in-...
2•WaitWaitWha•2m ago•0 comments

Media double standards Re ICE: protesters get headlines, victims get footnotes

https://damienduncan.substack.com/p/the-media-double-standard-re-ice
1•Politicrux•2m ago•0 comments

The Bitter Lesson of Agent Frameworks

https://twitter.com/gregpr07/status/2012052139384979773
1•gmays•4m ago•0 comments

Technical decisions that killed my SaaS

https://dontkillsaas.framer.website/
1•sillygoose_189•6m ago•1 comments

Additive white Gaussian noise

https://en.wikipedia.org/wiki/Additive_white_Gaussian_noise
1•gjvc•7m ago•0 comments

States Are Gunning to Ban 3D Printers and CNCs

https://www.electronicdesign.com/blogs/nonlinearities/blog/55352019/electronic-design-states-ban-...
3•WaitWaitWha•9m ago•1 comments

UK national security assessment: Global biodiversity loss, ecosystem collapse [pdf]

https://assets.publishing.service.gov.uk/media/696e0eae719d837d69afc7de/National_security_assessm...
3•heresie-dabord•11m ago•0 comments

Machine Learning Feature Store Book – Example Projects

https://github.com/featurestorebook/mlfs-book
1•teleforce•14m ago•0 comments

Prototaxites

https://en.wikipedia.org/wiki/Prototaxites
1•Metacelsus•14m ago•0 comments

Windows update disaster: security patch causes widespread system failures

https://www.forbes.com/sites/zakdoffman/2026/01/21/nightmare-microsoft-update-breaks-windows-for-...
1•xthe•15m ago•0 comments

NASA ends financial support for planetary science groups

https://www.scientificamerican.com/article/nasa-quietly-ends-financial-support-for-planetary-scie...
3•voxadam•15m ago•0 comments

MNN – fast, lightweight deep learning framework

https://github.com/alibaba/MNN
2•modinfo•15m ago•0 comments

AI Systems Performance Engineering

https://github.com/cfregly/ai-performance-engineering
1•teleforce•16m ago•0 comments

PTP Is the New NTP: How Data Centers Achieve Real-Time Precision

https://www.datacenterknowledge.com/networking/ptp-is-the-new-ntp-how-data-centers-are-achieving-...
2•WaitWaitWha•16m ago•0 comments

Triple Store, Triple Progress: Datalevin Posited for the Future

https://yyhh.org/blog/2026/01/triple-store-triple-progress-datalevin-posited-for-the-future/
1•huahaiy•23m ago•0 comments

Europe Could Kick U.S. Where It Hurts: The World Cup

https://www.politico.com/news/magazine/2026/01/21/the-12-people-who-hold-trumps-world-cup-in-thei...
2•JumpCrisscross•23m ago•1 comments

Yyvette's

https://yvettesbridalformal.p1r8.net/
3•Nition•25m ago•1 comments

Nugget – Customize Your iPhone

https://github.com/leminlimez/Nugget
1•orenlindsey•27m ago•0 comments

Steam Machine: Not So Hot If Priced at 1000 USD

https://boilingsteam.com/poll-steam-machine-not-so-hot-if-priced-at-1000-usd/
2•ekianjo•29m ago•0 comments

They're scared of us now: how co-investment in a tropical forest saw off loggers

https://www.theguardian.com/environment/2025/dec/25/they-are-scared-of-us-now-how-one-tropical-fo...
1•PaulHoule•30m ago•0 comments

Spotify Lawsuit Triggered Anna's Archive Domain Name Suspensions

https://torrentfreak.com/unsealed-spotify-lawsuit-triggered-annas-archive-domain-name-suspensions/
2•maxeda•31m ago•0 comments

DiffRatio: A SOTA one-step Diffusion model with 50% less GPU memory

https://arxiv.org/abs/2502.08005
1•LoMoGan•31m ago•0 comments

The success of 'natural language programming'

https://brooker.co.za/blog/2025/12/16/natural-language.html
1•gtirloni•31m ago•0 comments

FikoRE: 5G Network Emulator

https://github.com/nokia/5g-network-emulator
1•teleforce•32m ago•0 comments

Copyright Kills Competition

https://www.eff.org/deeplinks/2026/01/copyright-kills-competition
2•hn_acker•33m ago•0 comments

Why Are We Still So Afraid of Using the Grumpy Old Period?

https://www.nytimes.com/2026/01/15/magazine/ending-sentences-period.html
2•samclemens•36m ago•0 comments

Rand Paul Only Wants Google to Be Arbiter of Truth When the Videos Are About Him

https://www.techdirt.com/2026/01/21/rand-paul-only-wants-google-to-be-the-arbiter-of-truth-when-t...
11•hn_acker•36m ago•4 comments

Your Best Work Is Invisible Because You Want It That Way

https://twitter.com/VincentChan/status/2014130978235818312
1•vincentchan•36m ago•0 comments

Generalised Tensors for Machine Learning in Idris

https://glaive-research.org/2026/01/21/Generalised-tensors.html
1•lang_agnostic•36m ago•0 comments