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.

Futurism says Meta has "almost nothing" to show for AI. The numbers say

https://runtimewire.com/article/futurism-says-meta-has-almost-nothing-to-show-for-ai-the-numbers-...
1•ryanmerket•11s ago•0 comments

Ask HN: Do Something about Bots

1•gregdaniels421•35s ago•0 comments

MkLinux and the pimped-out Apple Workgroup Server 9150

http://oldvcr.blogspot.com/2026/08/mklinux-and-pimped-out-apple-workgroup.html
1•goldenskye•1m ago•0 comments

Linux desktop market share has hit over 10% in North America

https://old.reddit.com/r/linux/comments/1vcpk8i/linux_desktop_market_share_has_hit_over_10_in/
2•dviola•4m ago•0 comments

Don't Take the Black Pill (Text Adaptation)

https://andrewkelley.me/post/dont-take-black-pill.html
2•zdw•9m ago•0 comments

Show HN: FirstEmployee.ai – Start a Business

https://firstemployee.ai/
1•nadermx•14m ago•0 comments

Plug-in solar is coming. Plug-in batteries should follow

https://www.regen.co.uk/insights/plug-in-solar-is-coming-plug-in-batteries-should-follow
1•thelastgallon•16m ago•0 comments

Deep-sea vehicles spot 'alien' sharks deep beneath the waves in the Pacific

https://www.science.org/content/article/deep-sea-vehicles-spot-alien-sharks-deep-beneath-waves-pa...
2•pkaeding•23m ago•0 comments

The world first agentic AI radio

https://www.twitch.tv/newsmyimaginationai
3•myimaginationai•31m ago•1 comments

Recurse Center Halftime Reflection

https://holistudio.github.io//2025/11/02/RC-half/
2•luu•38m ago•0 comments

Four Time Scales for Technology Development and Deployment

https://rodneybrooks.com/four-time-scales-for-technology-development-and-deployment/
8•jeffreyrogers•47m ago•0 comments

Design Thinking Is B.S. (2018)

https://www.fastcompany.com/90166804/design-thinking-is-b-s
4•walterbell•57m ago•0 comments

DeepMind Disbands AlphaFold Team, Pivots to Gemini

https://unusualwhales.com/news/deepmind-disbands-alphafold-team-gemini-pivot
4•gmays•58m ago•1 comments

Building agents that survive their own execution

https://conol.ai/blog/building-agents-that-survive-their-own-execution
2•greatony•1h ago•0 comments

When random.bytes() runs but doesn't work

https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt
3•Funes-•1h ago•0 comments

Show HN: I'm a 15 Year Old Wannabe Engineer, This Is a Cycloidal Gearbox I Built

https://github.com/tom-ilan/cycloidal_gearbox
26•tomilan•1h ago•6 comments

What 'Pluribus' Gets Right About the Hive Mind (2025)

https://www.psychologytoday.com/us/blog/priceless/202512/what-pluribus-gets-right-about-the-hive-...
2•walterbell•1h ago•0 comments

Portal: Current Events

https://en.wikipedia.org/wiki/Portal:Current_events
5•adm4•1h ago•0 comments

Fuck the Algorithm. Own Your Data

https://github.com/adnqcr7-code/privacy-yt-downloader
3•kairos_agent•1h ago•0 comments

Living in the Math World Means Threading the Needle

https://www.quantamagazine.org/hong-wang-wins-2026-fields-medal-the-third-woman-ever-20260723/
3•gmays•1h ago•0 comments

Show HN: CostPerPrompt – Live AI API pricing and real-workload cost calculators

https://costperprompt.com/
3•ahmed_hassan7•1h ago•0 comments

Inverseminar

https://phys.org/news/2026-07-inverting-seminar-recover-scientific-papers.html
4•sundarurfriend•1h ago•0 comments

'Death by organ donation' floated for patients approved for euthanasia

https://nationalpost.com/news/death-by-organ-donation-for-maid-patients
3•walterbell•1h ago•0 comments

Hiring FDE's (full stack software eng) // 100K+ & equity // AI for Manufacturing

https://www.tryharmony.ai/
2•georgeharmony•1h ago•0 comments

I made a free directory to submit your games

https://www.twelve.games
3•mattmerrick•1h ago•0 comments

Token diplomacy: How China is shaping the AI future

https://www.semafor.com/article/07/28/2026/token-diplomacy-how-china-is-shaping-the-worlds-ai-future
3•qwikhost•1h ago•2 comments

Bessent and the Fed help Japan reverse months of yen losses

https://www.japantimes.co.jp/business/2026/08/01/economy/us-treasury-yen-support/
6•mikhael•1h ago•1 comments

The Linux distro and desktop brawler

https://distrofighter.com/
6•ashitlerferad•1h ago•0 comments

AUR Packages Adoption And Pushes Disabled

https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/message/YPJ3FQYJTJXXY3R...
2•Alien1Being•1h ago•0 comments

Go 1.27 Interactive Tour

https://victoriametrics.com/blog/go-1-27/index.html
54•Hixon10•1h ago•9 comments