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.

Alzheimer's can be reversed to achieve full neurological recovery in animals

https://case.edu/news/new-study-shows-alzheimers-disease-can-be-reversed-achieve-full-neurologica...
1•thunderbong•44s ago•0 comments

Achieving Lasting Remission for HIV

https://knowablemagazine.org/content/article/health-disease/2025/lasting-remission-hiv-with-broad...
1•PaulHoule•2m ago•0 comments

Japanese pen maker Pilot raises price of bestseller for first time in 40 years

https://www.ft.com/content/94c1e62e-f953-4f48-9572-fedba69ef5e3
2•bookofjoe•3m ago•1 comments

Using .gov Email Addresses for Age and Information Verification

https://blog.certisfy.com/2025/12/using-gov-email-addresses-for-age-and.html
1•Edmond•5m ago•0 comments

The HTML Elements Time Forgot

https://htmhell.dev/adventcalendar/2025/22/
1•todsacerdoti•7m ago•0 comments

MultiLang‑ASM – The first multilingual x86_64 assembler (10languages,reversible)

https://github.com/cyberenigma-lgtm/MultiLang-ASM
1•neuro-os•10m ago•1 comments

Is Alexa Overloaded

1•dzdt•22m ago•0 comments

Timeless Games

https://cxong.github.io/2025/12/timeless-games
3•todsacerdoti•23m ago•1 comments

Tesla Robotaxis Are Big on Wall St. but Lagging on Roads

https://www.nytimes.com/2025/12/25/business/tesla-robotaxis-austin-waymo.html
2•edward•24m ago•0 comments

Salesforce regrets firing 4000 experienced staff and replacing them with AI

https://maarthandam.com/2025/12/25/salesforce-regrets-firing-4000-staff-ai/
5•whynotmaybe•24m ago•0 comments

Ask HN: MIT grad, junior dev layoffs – watching my daughter lose faith in merit

3•MITfather•24m ago•2 comments

The Smell of Kerosene [pdf]

https://www.nasa.gov/wp-content/uploads/2021/04/88797main_kerosene.pdf
2•belter•25m ago•0 comments

Show HN: Festive Greetings – Create and share Holiday Cards with your loved ones

https://festivegreeting.vercel.app/
2•mr_o47•29m ago•0 comments

Show HN: Paste Recipe – AI-powered recipe formatter

https://www.pasterecipe.com
1•BuildItBusk•34m ago•1 comments

The Architecture of Open Source Applications

https://aosabook.org/en/index.html
2•bcye•40m ago•0 comments

Waymo is using the Honk app to pay $20-$24 to manually close doors

https://www.washingtonpost.com/technology/2025/12/25/waymo-robots-human-work/
3•sleepingreset•40m ago•0 comments

Artists revolt as X's latest feature lets users AI-edit any photo

https://piunikaweb.com/2025/12/25/x-grok-ai-edit-image-feature-artists-leaving-no-opt-out/
2•doright•41m ago•1 comments

Largest Companies by Marketcap

https://companiesmarketcap.com/
1•ksec•42m ago•1 comments

Legible Hacker News

https://adam.farkas.pro/legible-hackernews/
2•piersj225•47m ago•2 comments

Inferal Workspace Architecture: How We Work at Inferal

https://gist.github.com/yrashk/59b1cd144864bc3320a0ac0c766d4f55
1•yrashk•47m ago•1 comments

Show HN: Q-SSP – Quantum-Entropy Sanitization (7.997 bits/byte)

https://github.com/Alpha-Legents/Q-SSP
1•zenith_vortex•47m ago•1 comments

The worst fire in space history

https://www.sciencefocus.com/space/fire-in-space-jerry-linenger
1•slow_typist•48m ago•1 comments

Older Americans Quit Weight-Loss Drugs in Droves

https://www.nytimes.com/2025/12/21/health/older-people-glp1-weight.html
1•prmph•52m ago•1 comments

I wrote a 2M-character novel with ChatGPT, without an outline

1•hideroze•53m ago•2 comments

I learned to stop worrying and love AI slop

https://www.technologyreview.com/2025/12/23/1130396/how-i-learned-to-stop-worrying-and-love-ai-slop/
1•Brajeshwar•58m ago•0 comments

AI overestimates how smart people are, according to economists

https://techxplore.com/news/2025-12-ai-overestimates-smart-people-economists.html
1•Brajeshwar•58m ago•0 comments

Bee collecting honeydew produced by scale insects [video]

https://www.youtube.com/watch?v=-4lijMoA_3M
1•joebig•59m ago•0 comments

Asahi Linux with Sway on the MacBook Air M2

https://daniel.lawrence.lu/blog/2024-12-01-asahi-linux-with-sway-on-the-macbook-air-m2/
2•andsoitis•1h ago•0 comments

Complaint Tablet to EA-NāṣIR – Oldest Customer Complaint

https://en.wikipedia.org/wiki/Complaint_tablet_to_Ea-nāṣir
1•andsoitis•1h ago•0 comments

Show HN: Crossview – visualize Crossplane resources and compositions

https://corpobit.com/products/crossview
1•moeidheidari•1h ago•0 comments