frontpage.
newsnewestaskshowjobs

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.

Ask HN: Steam OS as a Windows Replacement?

1•x______________•3m ago•0 comments

Mitchell Hashimoto: Defining Taste

https://xcancel.com/i/article/2070665127331037290
1•tamnd•3m ago•0 comments

XiaoKe API Gateway: PDF OCR Scrape Translate Review SummarizeXiaoKe API Gateway

https://github.com/y9695430-lang/xiaoke-api-gateway
1•xiaoke-api•4m ago•0 comments

Gnome AI Assistant Adds Image Generation Support

https://www.phoronix.com/news/GNOME-Newelle-Image-Gen
1•mehmetoguzderin•4m ago•0 comments

Show HN: RapidCam – Browser-based, parametric 2D CAD/CAM app for CNC and laser

https://rapidcam.app
1•Jemm•6m ago•0 comments

Tapered Language Models

https://arxiv.org/abs/2606.23670
1•sonabinu•8m ago•0 comments

Saying the Obvious Thing

https://www.seangoedecke.com/saying-the-obvious-thing/
1•swah•8m ago•0 comments

Show HN: Visual Map of ICML 2026 Papers

https://www.alphaxiv.org/icml/map
1•vednig•9m ago•0 comments

How Saarinen and Eames Imagined Airport Operations and Influenced Dulles

https://www.youtube.com/watch?v=6C3iKBJhgZM
1•master_crab•13m ago•0 comments

Michael Saylor's Strategy has no easy way out as Bitcoin prices continue to drop

https://finance.yahoo.com/markets/article/michael-saylors-strategy-faces-no-easy-way-out-as-bitco...
1•decimalenough•13m ago•0 comments

Wan Streamer v0.1: End-to-End Real-Time Interactive Foundation Models

https://wan-streamer.com
1•davedx•13m ago•1 comments

Ukraine launches 40-day operation to push Russia to end the war

https://www.yacnews.com/ukraine-launches-40-day-operation-to-push-russia-to-end-the-war/
3•ortr•14m ago•1 comments

Solo Developers and Builders, Let's Connect

1•enlightpixel•14m ago•0 comments

Show HN: Open Tag, the open source Claude Tag

https://github.com/CopilotKit/OpenTag
1•nathan_tarbert•15m ago•0 comments

Agentic Code Review

https://www.oreilly.com/radar/agentic-code-review/
2•pella•19m ago•0 comments

Hacker News Job Trends

https://hackernewstrends.com/who-is-hiring
1•nguyentranvu•21m ago•0 comments

Corgi, says it didn't steal from open source, issues cease and desist

https://techcrunch.com/2026/06/26/corgi-the-buzzy-y-combinator-backed-insurance-tech-startup-says...
1•627467•21m ago•0 comments

Germany: Hottest temperature on record 41.3C (106.3°F)

https://phys.org/news/2026-06-germany-hottest-temperature-413c-weather.html
4•defrost•24m ago•0 comments

Jeeves: A minimal systemd TUI written in Go for lightweight hardware

https://github.com/aymanhs/jeeves
1•aymanhs72•25m ago•0 comments

India: Factory workers told to film themselves for AI/robot training

https://www.theguardian.com/global-development/2026/jun/24/indian-factory-workers-told-film-thems...
2•KellyCriterion•26m ago•0 comments

Liquid Radius

https://liquidradius.com/
1•bookofjoe•30m ago•0 comments

William: A tiny poetry model in the browser

https://akshit.org/2026/06/21/william/
2•noteness•31m ago•0 comments

If You Can't Hold It, You Don't Own It

https://dervis.de/physical/
3•cemdervis•32m ago•0 comments

Looking for digital nomads to test VPN with streaming services

https://shp.network
1•SHPnetwork•32m ago•1 comments

I built a habit tracker with no streaks

https://habitoftheday.com/
1•ismaelvli•36m ago•1 comments

It's Official: F-35s Are Now Being Delivered Without Radars

https://www.twz.com/air/its-official-f-35s-are-now-being-delivered-without-radars
1•SenHeng•37m ago•2 comments

NPM adds preventive account protection for high-impact accounts

https://github.blog/changelog/2026-06-25-npm-adds-preventive-account-protection-for-high-impact-a...
1•exploraz•38m ago•0 comments

Moral elevation can induce nursing

https://pubmed.ncbi.nlm.nih.gov/18410202/
1•akyuu•42m ago•0 comments

Understanding the Linux Kernel: The Scheduler

https://internals-for-interns.com/posts/linux-kernel-scheduler/
1•valyala•47m ago•0 comments

Dolby Launches First UPC AV1 Lawsuit Against TPV Subsidiaries

https://michael7924.substack.com/p/dolby-launches-first-upc-av1-lawsuit
1•ledoge•54m ago•0 comments