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.

Show HN: AutomatiQ – generate web automations/scrapers just by browsing the site

https://github.com/StoneSteel27/AutomatiQ
1•stonesteel27•35s ago•0 comments

xAI sued for firing an engineer who raised alarms about Grok safety

https://techcrunch.com/2026/06/10/xai-fired-an-engineer-who-raised-alarms-about-grok-safety-new-l...
1•reasonableklout•1m ago•0 comments

Binance set to lose permission to operate in EU, sources say

https://www.reuters.com/business/finance/binance-set-lose-eu-licence-bid-permission-offer-service...
1•lode•2m ago•0 comments

Deep Fission Goes Public

https://www.deepfission.com/investors/news-events/press-releases/detail/110/advanced-nuclear-comp...
1•simonebrunozzi•2m ago•0 comments

Microsoft's China AI Business Grows on OpenAI Model Sales

https://www.bloomberg.com/news/articles/2026-06-17/microsoft-s-china-ai-business-grows-on-openai-...
1•0in•2m ago•0 comments

Run Agent Skills with mistral.rs v0.8.10: /v1/skills support and more

1•ericlbuehler•2m ago•0 comments

Real-time brand value index for all 48 World Cup 2026 teams

https://sports.yourbrandvalue.com/world-cup-brand-index-tool.html
1•tnn_YBVS•2m ago•0 comments

"Dangerous" AI models are coming no matter what

https://www.wired.com/story/dangerous-ai-models-are-coming-no-matter-what/
1•joozio•2m ago•0 comments

Trump Signs "Treaty of Versailles" in Israeli-American Surrender to Iran

https://www.theguardian.com/us-news/live/2026/jun/17/trump-georgia-primary-mike-collins-jon-ossof...
2•casey2•8m ago•0 comments

Gloat: Q2 Grant Halfway Report

https://gloathub.org/blog/2026/06/16/gloat-q2-grant-halfway-report/
1•tosh•9m ago•0 comments

GLM 5.2 is now available via a unified Model API

https://www.hpc-ai.com/model-apis
1•hpcaitech•9m ago•1 comments

There Were Lots of Invitations, and I Know You Sent Me Some

https://www.astralcodexten.com/p/waiting-for-the-miracle
2•Michelangelo11•13m ago•0 comments

An URL shortner for all Codeberg users

https://libl.in
1•mindaslab•15m ago•0 comments

South Korea's Fake Online Stores Help Shopping Addicts Save Money

https://www.odditycentral.com/news/south-koreas-fake-online-stores-help-shopping-addicts-save-mon...
2•networked•19m ago•0 comments

CBC will no longer air NHL games in 'end of an era' as broadcast deal expires

https://www.cbc.ca/sports/cbc-nhl-hockey-night-in-canada-ends-9.7236977
3•canucker2016•20m ago•0 comments

Zigzag Decoding with AVX-512

https://zeux.io/2026/06/17/zigzag-decoding-avx512/
1•matt_d•20m ago•0 comments

The 14-point US-Iran peace plan, annotated

https://www.cnn.com/2026/06/17/politics/us-iran-memo-annotated-intl-vis
2•SilverElfin•20m ago•0 comments

Trump admin blocking Fable 5 rerelease unless Anthropic ensures no jailbreaks

https://www.wired.com/story/the-white-house-wants-anthropic-to-block-all-jailbreaks-that-may-not-...
4•reasonableklout•21m ago•1 comments

JPMorgan Chase cuts off Anthropic access for its Hong Kong staff

https://www.ft.com/content/de83d303-6a03-456b-bfb9-7b11dd502ab3
4•frb•21m ago•0 comments

An open-source AI just beat OpenAI's GPT-5.5 at coding (1/6th the price)

https://docs.z.ai/guides/llm/glm-5.2
1•Raj_Sidwadkar•24m ago•0 comments

GLM 5.2 playing text adventures

https://entropicthoughts.com/glm-5-2-playing-text-adventures
1•kqr•26m ago•0 comments

An Open Source Implementation of Notebook LM

https://github.com/lfnovo/open-notebook
1•saikatsg•27m ago•0 comments

Explaining Attention with Program Synthesis

https://arxiv.org/abs/2606.19317
1•E-Reverance•31m ago•0 comments

Data Viz and Table Design from the Letterpress Era

https://chris-parmer.com/data-viz-from-the-letterpress-era/
1•chriddyp•31m ago•0 comments

Estimate and pay your Q2 taxes

https://www.kip-ai.com/estimate
1•prudhvid•32m ago•0 comments

Does Your Programming Language Ever Surprise You in a Good Way?

https://donraab.medium.com/does-your-programming-language-ever-surprise-you-in-a-good-way-eb29e1e...
1•ingve•39m ago•1 comments

The Australian Government to Require SMS/MMS Sender ID Registraion

https://www.acma.gov.au/sms-sender-id-register
19•anitil•42m ago•3 comments

How to Become a Person After Smartphones Have Rotted Your Brain

https://www.thenewatlantis.com/publications/how-to-become-a-person-after-smartphones-have-rotted-...
15•the-mitr•42m ago•1 comments

Six months of AI in 2026, and a whole lot of noise

https://jatniel.dev/en/bytes/six-months-of-ai-in-2026-and-a-whole-lot-of-noise
1•jtnl•44m ago•0 comments

LLMs: Don't use a sledgehammer when tweezers will do

https://superuserdone.com/posts/2026-06-18-dont-use-a-sledgehammer/
1•SuperUserDone•45m ago•0 comments