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.

Ziyooren/Software-Coupons

https://github.com/ziyooren/software-coupons
1•iplaypc•3m ago•0 comments

Individual Knowledge in the Internet Age

https://er.educause.edu/articles/2010/4/individual-knowledge-in-the-internet-age
1•sublinear•4m ago•0 comments

DeepSeek v4.1 Flash 1017 Scores 45 in Artificial Analysis

https://artificialanalysis.ai/models/deepseek-v4-1-flash-1017
1•theanonymousone•5m ago•0 comments

Verisign .com Domain Name Registry Consumer Class Action

https://www.hbsslaw.com/cases/verisign-com-domain-name-registry-consumer-class-action
1•greyface-•6m ago•0 comments

James Li Investigated Sam Altman for a Year [video]

https://www.youtube.com/watch?v=2kqAJaMqHo4
1•johnnyApplePRNG•6m ago•0 comments

The Birth and Rise of India's IT Outsourcing Industry [video]

https://www.youtube.com/watch?v=NYej-KstgTg
1•ryzvonusef•7m ago•1 comments

Advertisers can target ChatGPT by prompt

https://www.theneurondaily.com/p/october-16-friday-1362
1•GloVin•8m ago•0 comments

Show HN: Strot – Compile an LLM's intent once, run decisions locally forever

https://github.com/strot-ai/Project-STROT
2•solohunter001•14m ago•0 comments

Show HN: Chitra Studio – Your AI Media Workstation for Macs

https://chitra.studio/
1•anand_murugan•19m ago•1 comments

Show HN: Yila – A Codex for Scientific Research

https://yila.ai
2•blacktechnology•22m ago•0 comments

Lobste.rs Deactivates "Vibecoding" Tag

https://lobste.rs/s/h0eate/updates_site_guidelines_ai_llm_tags
2•droidjj•24m ago•1 comments

Show HN: Open Artifacts – host AI artifacts on your own Cloudflare account

https://open-artifacts.com/
1•leourbina•26m ago•1 comments

Measuring Intelligence Beyond Human Scale

https://www.lesswrong.com/posts/avtquSx2PkWsxXW6T/how-to-measure-intelligence-beyond-human-scale
2•nicholascarolan•29m ago•0 comments

Man arrested after discussing plans for childcare mass shooting with [Claude]

https://www.smh.com.au/national/nsw/sydney-man-allegedly-discussed-plans-for-childcare-mass-shoot...
3•milderworkacc•33m ago•1 comments

Xyzzy

https://xyzzy.com
1•sans_souse•43m ago•0 comments

Chip Hall of Fame: The Signetics NE555

https://spectrum.ieee.org/chip-hall-of-fame-signetics-ne555
1•mindcrime•43m ago•0 comments

AI Is Not a Race

https://www.nitinpai.in/2026/10/19/ai-is-not-a-race
2•nitin-pai•45m ago•2 comments

A small model with a review loop matches a larger one at 58% of the cost

https://theopenengine.com/blog/review-loop/
1•eivindmeyer•46m ago•0 comments

I made tiny robot eyes

https://www.youtube.com/watch?v=GbcN0bPs-Ig
1•oliculipolicula•46m ago•0 comments

Ask HN: New Outlook` sends everything through Microsoft Servers

2•NicoJuicy•48m ago•1 comments

Zepto Scales Customer Support on Databricks and MLflow

https://www.databricks.com/blog/evaluation-first-ai-agents-how-zepto-scales-customer-support-data...
1•akbarnama•54m ago•0 comments

Who lives without a car in the Bay Area

https://maxmautner.com/2026/10/16/sf-car-free.html
1•mslate•59m ago•2 comments

Calling all GPUs: help us benchmark SonicBoom v0.0.3

https://github.com/hardenedlinux/SonicBoom/issues/2
3•nalaginrut•59m ago•0 comments

Remade.Wiki

https://remade.wiki/
1•beatthatflight•1h ago•0 comments

Dead German Guys

https://blog.coredump.cx/p/dead-german-guys
2•surprisetalk•1h ago•0 comments

China Plans to Tighten Export Controls on AI Technologies

https://wallhop.io/https://www.theepochtimes.com//china/china-plans-to-tighten-export-controls-on...
3•jamiesonbecker•1h ago•2 comments

If you want to make a bajillion dollars, solve agent identity

https://12gramsofcarbon.com/p/agentics-agent-identity-is-a-really
2•theahura•1h ago•0 comments

Gaming's all‑digital future doesn't include Sonic the Hedgehog 3 and Pikmin 2

https://sethmlarson.dev/gaming-all-digital-future-and-creative-constraint
1•aray07•1h ago•0 comments

"The AI bubble is about to burst and a big market correction's coming" – NY Post

https://nypost.com/2026/10/17/business/the-ai-bubble-is-about-to-burst-much-like-the-infamous-dot...
4•MilnerRoute•1h ago•2 comments

Mathematics, Science and Artificial intelligence by Prof. Weinan E [video]

https://www.youtube.com/watch?v=70oUM-TdRds
1•belleville•1h ago•0 comments