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.

Wk. 5 of Building an MMO

https://www.eldermyr.com
1•josiahturnq•1m ago•1 comments

EEG and VR project (Live presentation and Q&A on Sept first) from PiEEG Founders

https://www.reddit.com/r/MetaQuestVR/comments/1vxjqkr/comment/p5pdvcl/
1•Christiangmer•2m ago•0 comments

GitMir – an open source IDE that fixes your Claude development

https://ide.gitmir.com/opensource
1•venediktov•4m ago•0 comments

I, for one, can't wait to join the permanent underclass

https://singularitynow.substack.com/p/i-for-one-cant-wait-to-join-the-permanent
1•danduma•7m ago•0 comments

Fractals can be made without computers

https://www.youtube.com/watch?v=8XjQ10ph4yo
1•jerrysneede•9m ago•0 comments

AI Is Dissolving Software Moats. China Did It to Hardware First

https://mehmetmhy.com/posts/modern_moat/
1•mehmet_mhy•11m ago•2 comments

Those of you who are daily driving Linux, what are your other devices?

1•amichae2•13m ago•1 comments

I Built a Reddit-Like Forum for Agents. They Designed a Self-Modifying Assembly

https://medium.com/@Koukyosyumei/i-built-a-reddit-like-forum-for-ai-agents-f8f6515f28b1
1•syumei•16m ago•0 comments

Table of Integrals

https://www.integral-table.com/
1•pykello•17m ago•0 comments

Oj: Rust Native Replacement for Vite

https://rapha.land/introducing-oj/
2•0xedb•19m ago•0 comments

I audited 2,475 businesses for AI-search readiness. 88% failed

https://docs.google.com/document/d/1Z_RNzARxQZS9TDmQDGr7Da5mqqmbwTbbe8pWvl92tHw/edit?usp=sharing
1•styleforge•22m ago•0 comments

Show HN: A cloud harness for long autonomous work

https://www.usebourne.com/
1•bgrgndzz•23m ago•0 comments

AI Skills for Real Engineers

https://blog.master.dev/introducing-ai-skills-for-real-engineers/
1•ibobev•26m ago•0 comments

Keyboard Shortcuts That Display the Correct Modifier Key per OS

https://blog.master.dev/keyboard-shortcuts-that-display-the-correct-modifier-key-per-os/
1•ibobev•27m ago•0 comments

Sandcastle

https://blog.master.dev/introducing-sandcastle/
1•ibobev•27m ago•0 comments

SaaS Isn't Dead. Sameness Is

https://aicoding.leaflet.pub/3mtu6c5wsvc2n
1•Shoetp•32m ago•0 comments

College Applications Are Changing Again, Thanks to A.I. and Politics

https://www.nytimes.com/2026/08/24/us/college-admissions-changes.html
1•apparent•34m ago•1 comments

Ask HN: Non-engineers, how often do you code products? And how?

1•sakuraiben•35m ago•0 comments

Reqwest vs. ureq vs. hyper: Which Rust HTTP Client in 2026?

https://rustify.rs/articles/rust-reqwest-vs-ureq-vs-hyper-2026
1•kannanpoem1984•38m ago•1 comments

A Simplified Mental Model of LLMs

https://win-vector.com/2026/08/24/a-simplified-mental-model-of-llms/
2•jmount•39m ago•0 comments

Machine-Generated and Checked Proofs for a Verified Compiler (Experience Report)

https://dl.acm.org/doi/10.1145/3828700
1•matt_d•40m ago•0 comments

What my dad taught me about AI coding in the 90s

https://askmike.org/articles/ai-coding-lessons-in-the-90s-from-my-dad/
2•askmike•42m ago•0 comments

How Far Can NYC Transit Take You?

https://subway.fyi/60minutes
1•thunderbong•44m ago•0 comments

Playing whack-a-mole is losing

https://dadrian.io/blog/posts/whack-a-mole-is-losing/
1•tabletcorry•49m ago•0 comments

Pluralistic: How Canada can help Americans and defeat America

https://pluralistic.net/2026/08/24/elbows-really-up/
3•A_D_E_P_T•49m ago•0 comments

Handling 8 thousand mouse refreshes per second in Godot Engine

https://godotengine.org/article/fixing-high-polling-rate-mice-on-windows/
3•jaimex2•51m ago•0 comments

UK will use Ukraine battlefield data to train AI and use it againsts protesters

https://www.theguardian.com/politics/2026/aug/24/uk-to-use-ukraine-battlefield-data-to-train-ai-t...
3•skor•53m ago•1 comments

FreeToken: Efficient Edge-Native Moe Serving with Bandwidth-Adaptive Execution

https://arxiv.org/abs/2608.16157
1•Anon84•55m ago•0 comments

Iran Is Using Foreign Criminals to Attack Its Critics Overseas

https://www.newyorker.com/news/letter-from-the-uk/iran-is-using-foreign-criminals-to-attack-its-c...
1•firefax•58m ago•0 comments

The cost of today's "smart" devices

https://www.fsf.org/blogs/community/2026-the-hidden-cost-of-todays-smart-devices
2•smitty1e•1h ago•0 comments