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•1y ago

Comments

zoezoezoezoe•1y 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•1y 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.

10 Years with Google Glass – Thomas Suarez (2023)

https://tomthecarrot.notion.site/10-years-with-Google-Glass-b39d8268a48d4e1089598316f721d8b4
1•tash_2s•1m ago•0 comments

Grab what you can while you can: The new reality in the South China Sea

https://www.bbc.com/news/articles/cy823n3ln29o
1•breve•1m ago•0 comments

'Driving like teenagers': Waymo robotaxis run red lights, nearly hit pedestrians

https://www.cnn.com/us/waymo-robotaxis-safety-invs
1•breve•2m ago•0 comments

Tony Gilroy Accepts Award for Andor: "Fuck the Empire "

https://kottke.org/26/06/tony-gilroy-accepts-award-for-andor-fuck-the-empire-1
1•jay_kyburz•9m ago•1 comments

Demand Is Booming for New No Tech, Repairable Tractor

https://www.404media.co/demand-is-booming-for-ursa-ag-new-no-tech-repairable-tractor/
4•jay_kyburz•12m ago•1 comments

24. Goulash Programming Night

https://entropia.de/GPN24/en
1•throw_await•13m ago•1 comments

Intel bit off more than it could chew with 18A process node

https://www.theregister.com/systems/2026/06/03/intel-bit-off-more-than-it-could-chew-with-18a-pro...
2•WarOnPrivacy•14m ago•0 comments

People with cancer / HIV could lose Medicaid under new work rules, advocates say

https://www.npr.org/2026/06/03/nx-s1-5845097/medicaid-work-requirements-cuts-hiv-cancer
3•littlexsparkee•14m ago•1 comments

Can you go 82-0?

https://www.82-0.com/
1•jxmorris12•14m ago•0 comments

Transparency.org Accuses Trump of Using Anti-Corruption Agenda Against Brazil [pdf]

https://files.transparencycdn.org/images/Letter-from-Transparency-International_PAC_2026-01-12-08...
2•peq42•15m ago•0 comments

DNS-Aid

https://github.com/dns-aid
1•simonpure•19m ago•0 comments

Anchor – Zero-dependency LLM hallucination detector

https://github.com/malaxiya202505https://github.com/malaxiya20250530-glitch/anchor-llm-in-truth
1•hubeiligsng429•21m ago•0 comments

Microsoft Office 2019 for Mac Will Soon Stop Letting You Edit Documents

https://www.macrumors.com/2026/06/02/microsoft-office-2019-for-mac-no-edit-documents/
2•CharlesW•21m ago•0 comments

We Uncovered a Hidden Wealth Transfer in the SpaceX IPO. You're Holding the Bag [video]

https://www.youtube.com/watch?v=sYA-z0Y8WRQ
5•CharlesW•23m ago•0 comments

ADHD: Parallel Divergent Ideation for Coding Agents

https://adhdstack.github.io/
1•pgedge_postgres•25m ago•1 comments

I made a realtime world model for games that works on consumer GPUs

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

We shrank our TimescaleDB chunks from 30 days to 7

https://tech.wmg.com/why-we-shrank-our-timescaledb-chunks-from-30-days-to-7-07cab8afefc5
1•yask123•29m ago•0 comments

Haiku, a generative music album for Mac OS

https://www.giorgiosancristoforo.net/ooame/
1•CharlesW•29m ago•0 comments

H-1B Crackdown on Indian Workers Erodes a Texas Real Estate Boom

https://www.bloomberg.com/features/2026-dallas-h1b-housing-market/
8•littlexsparkee•31m ago•1 comments

Read vehicle license plates this API gives you 2,500 free reads per month

https://www.platenexus.com/?lang=en
2•androg•33m ago•0 comments

Show HN: Fork of Rsync

https://github.com/benja2998/better-sync
3•benja2998•35m ago•0 comments

SpaceX Sets Price for $1.77T IPO

https://www.cnbc.com/2026/06/03/spacex-ipo-stock-price-roadshow-musk.html
12•gen220•37m ago•0 comments

Roadmap 2026 – Fluxer

https://fluxer.app/blog/roadmap-2026
1•Cider9986•39m ago•1 comments

Stop Location-Tracking Your Friends and Lovers

https://www.nytimes.com/2026/06/03/opinion/location-sharing-surveillance-summer-house.html
4•corny•40m ago•1 comments

Deck Gallery

https://www.deck.gallery
1•handfuloflight•43m ago•0 comments

Know Your Nulls

https://nulls.claytn.dev/quiz/1
1•claytn•44m ago•0 comments

The Environmental Cost of AI: Carbon, Water, and Land Footprints

https://unu.edu/inweh/collection/environmental-cost-of-AIs-Enrgy-Use-Carbon-water-and-land-footpr...
2•SupremumLimit•46m ago•1 comments

Rockstar fit a city into PlayStation 2 memory [video]

https://www.youtube.com/watch?v=cIbCxbrBCys
2•birdculture•47m ago•0 comments

Google's Top DMCA Sender Plateaus at 70M Takedowns per Week

https://torrentfreak.com/googles-top-dmca-sender-plateaus-at-70-million-takedowns-per-week/
2•aa_is_op•49m ago•0 comments

I built a local news website

https://www.thomasmcgee.co/article/i-built-a-local-news-website
2•SunshineTheCat•50m ago•0 comments