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.

Proactive AI for Superintelligent Agents

https://research.google/pubs/proactive-ai-for-superintelligent-agents/
1•theanonymousone•5m ago•0 comments

Ask HN: What happened to Anti-Virus suites?

1•scanny•5m ago•1 comments

The McGurk effect: what you see changes what you hear

https://www.transitivebullsh.it/projects/the-mcgurk-effect
1•transitivebs•6m ago•1 comments

Meta Opens Muse Spark's Weights with Strings Attached

https://ailately.com/articles/meta-muse-spark-open-weights
1•ryanedennis•7m ago•0 comments

Comparison of Browser Engines

https://en.wikipedia.org/wiki/Comparison_of_browser_engines
1•andsoitis•7m ago•0 comments

Open Source Without the Open Door

https://abbykearns.substack.com/p/open-source-without-the-open-door
1•gpi•10m ago•0 comments

We found a Tencent agent fleet

https://swarmcha.se/posts/chinese-agent-fleet-full-report
2•rurban•11m ago•1 comments

Show HN: SpeakoFlow – Free, open-source voice typing for Windows, Mac and Linux

https://www.speakoflow.com/
1•AbhishekBarali•11m ago•0 comments

ConvyCanvas – AI Tutor for Euclid's Elements

https://convycanvas.com/elements/reader/#euclid_i/prop_001
1•atomicnature•12m ago•0 comments

Raz is a new programming language that compiles to C++

https://github.com/marboris/razlang
1•mehrabsp•13m ago•0 comments

Retired UPenn professor arrested after blocking Uber Eats robots

https://www.phillyvoice.com/philly-woman-arrested-uber-eats-robot-protest/
2•danso•13m ago•1 comments

The AI Paradox

https://www.youtube.com/watch?v=dcolM6W5Odc
1•penguin_booze•14m ago•0 comments

Show HN: UAC-Less Sudo for Windows

https://github.com/parkovski/wsudo
1•parkovski•17m ago•0 comments

The Rise of the Meritocracy (1958)

https://en.wikipedia.org/wiki/The_Rise_of_the_Meritocracy
3•theanonymousone•18m ago•0 comments

The Ronco Principle

https://paulgraham.com/ronco.html
3•tosh•19m ago•0 comments

Ask HN: How are you all ensuring your AI code isn't slop?

https://github.com/trypando/pando
1•bemeeker•20m ago•1 comments

A free .si domain checker with real registry data and sales comps

https://worthly.si/
1•mousabelhag•21m ago•0 comments

Hermes Agent: My containerized take

https://ricardodevries.com/blog/hermes-agent-my-containerized-take
2•ricardodevries•22m ago•0 comments

It's time to make your own RSS reader

https://tailscale.com/blog/self-hosted-rss-reader-freshrss
2•Brajeshwar•25m ago•1 comments

I built a mood tracker that helps you understand why you feel the way you do

https://apps.apple.com/us/app/moodpulse-mood-tracker/id6760206782
1•jimmy_lee•26m ago•0 comments

Some plants use carbon from fungi in addition to photosynthesis

https://scienceandfiction.net/stories/46_well-connected/
3•hhartmann•26m ago•1 comments

Creating Apps in SailfishOS Using Golang: Daemons and Stuff

https://chrastecky.dev/programming/creating-apps-in-sailfish-os-using-golang-daemons-and-stuff
1•Rikudou•26m ago•0 comments

Copycat Websites: The Endless Mayfly Network (2020)

https://casebook-static.pages.dev/case-studies/copycat-websites-endless-mayfly-network/
1•eustoria•26m ago•0 comments

US federal budget deficit jumps 12% in one year to nearly $2 Trillion

https://finance.yahoo.com/economy/policy/article/the-us-federal-budget-deficit-for-2026-just-came...
3•ck2•27m ago•2 comments

Capturing 400 American Girls and Their Most Meaningful Objects

https://petapixel.com/2026/10/17/photographer-spends-six-years-capturing-400-american-girls-and-t...
1•eustoria•28m ago•0 comments

Open and Emergent Problems in Agentic Privacy and Security

https://research.google/pubs/open-and-emergent-problems-in-agentic-privacy-and-security-a-context...
1•eustoria•29m ago•0 comments

The Engineering Behind the Internet [video]

https://www.youtube.com/watch?v=NiCgcUTL9_Q
2•gmays•30m ago•0 comments

CVE-2026-49950 and Why Upgrading Xinference Isn't Enough

https://medium.com/@husenet/cve-2026-49950-and-why-upgrading-xinference-isnt-enough-dd3c1f75deac
3•wondersky•33m ago•0 comments

Polymarket saw $600M in election trades after the elections were over

https://www.wired.com/story/over-dollar600-million-traded-on-polymarket-election-contracts-after-...
2•wondersky•37m ago•0 comments

Show HN: Open Scrantic – Johnny Castaway in Rust, from Disassembly via REA

https://github.com/glauberlima/open-scrantic
1•glauber•38m ago•0 comments