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.

Fast Factorial Algorithms

http://www.luschny.de/math/factorial/FastFactorialFunctions.htm
1•nill0•40s ago•0 comments

OpenAI commits S$300M to grow Singapore's AI capabilities

https://www.channelnewsasia.com/singapore/openai-singapore-300-million-ai-6128036
1•doppp•2m ago•0 comments

List of Consumer Reporting Companies [pdf]

https://files.consumerfinance.gov/f/documents/cfpb_consumer-reporting-companies_list_2025.pdf
1•m3047•3m ago•1 comments

Alternatives for the EDIT tool of LLM agents

https://antirez.com/news/166
1•calvinfo•7m ago•0 comments

Google to release first smart glasses since Google Glass flop

https://www.bbc.com/news/articles/cvgz1ynq1nqo
1•1659447091•8m ago•0 comments

Positive Alignment: Artificial Intelligence for Human Flourishing

https://arxiv.org/abs/2605.10310
1•lexandstuff•20m ago•0 comments

I Asked ChatGPT to Manage a Stock Portfolio

https://www.wsj.com/finance/investing/i-asked-chatgpt-to-manage-a-stock-portfolio-heres-how-it-di...
2•lxm•21m ago•1 comments

Slap Links – A Chrome extension inspired by SlapMac

https://slaplinks.app/
2•_matiassalles99•21m ago•1 comments

I'm Watching a Humanoid Robot Sort Packages

https://jpain.io/im-watching-a-humanoid-robot-sort-packages/
2•Eighth•24m ago•0 comments

LLM detector with science behind it

https://huggingface.co/spaces/akolpakov/SatorArepo
1•bold_iggl•27m ago•0 comments

Ask HN: What are Stainless users doing now that Anthropic has killed it?

3•ubutler•28m ago•0 comments

The Incompatibilities Between Generative AI and Art: Q&A with Ted Chiang

https://cdh.princeton.edu/blog/ted-chiang/
3•georgecmu•31m ago•2 comments

Show HN: Javalamp – A glowing terminal screensaver that keeps your Mac awake

https://github.com/breschio/javalamp
2•tbreschi•31m ago•0 comments

Everlane Represented a Millennial Ideal. Is It Dead?

https://www.nytimes.com/2026/05/19/style/the-fashions-shein-everlane-gucci-times-square.html
1•lxm•36m ago•0 comments

Tasks.org on Desktop

https://tasks.org/blog/desktop-app/
2•Quizzical4230•37m ago•0 comments

Canine Anatomy

https://veteriankey.com/canine-anatomy/
2•num42•37m ago•0 comments

S. 'Soma' Somasegar, 1966-2026: Microsoft and Madrona leader has passed away

https://www.geekwire.com/2026/s-soma-somasegar-1966-2026-microsoft-and-madrona-leader-was-a-champ...
2•SilverElfin•38m ago•1 comments

Supranim – Just a Bloody Web Framework Written in Nim

https://github.com/supranim/supranim
2•TheWiggles•38m ago•0 comments

The Wireworld Computer(1987)

https://www.quinapalus.com/wi-index.html
1•o4c•46m ago•0 comments

Evals Will Break and You Won't See It Coming

https://wanglun1996.github.io/blog/your-evals-will-break.html
2•rajveerb•46m ago•1 comments

Training within 10 hours of bedtime measurably hurts recovery

https://tryterra.co/research/best-time-to-workout-for-sleep
3•kyriakosel•52m ago•0 comments

Company Was an American Success Story. Until MAHA Influencers Sank It

https://www.thefp.com/p/this-company-was-an-american-success-until-maha-sank-it
1•rmason•52m ago•1 comments

Trump Order Would Push Banks to Check Clients' Citizenship Status

https://www.wsj.com/finance/regulation/trump-order-would-push-banks-to-check-clients-citizenship-...
3•petethomas•56m ago•0 comments

You Can't Park at 0.1c

https://samirvarma.substack.com/p/you-cant-quietly-park-at-01c
2•qsi•57m ago•0 comments

What are account recovery options with FusionAuth?

https://fusionauth.io/community/forum/topic/3133/what-are-account-recovery-options-with-fusionauth
1•mooreds•1h ago•0 comments

Why "Fast AI" and "Safe AI" Were Never in Conflict

https://www.enkryptai.com/blog/why-fast-ai-and-safe-ai-were-never-actually-in-conflict
2•mooreds•1h ago•0 comments

Etymonline: An Online Etymology Dictionary

https://www.etymonline.com
1•airstrike•1h ago•0 comments

Debunking the job-hopping myth: A Data-Driven Look at Tenure and Turnover [pdf]

https://www.nirsonline.org/wp-content/uploads/2025/09/25-Debunking-Job-Hopping-Myth_FINAL.pdf
2•gmays•1h ago•0 comments

Enterprise AI: Mystery Meat, Kill Zones, Cognitive Surrender, Vibe Bombs

https://kyield.com/insights/newsletter/2026/05/vibe-bombs-cognitive-surrender.html
2•mooreds•1h ago•0 comments

Apple Taps Virtual Avatar Firm Animato's Expertise and Intellectual Property

https://www.macrumors.com/2026/05/19/apple-acquires-animato/
1•mgh2•1h ago•0 comments