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.

American capitalism is run by millionaires, not billionaires

https://www.economist.com/business/2026/06/10/american-capitalism-is-run-by-millionaires-not-bill...
2•Anon84•1m ago•0 comments

A live ledger of things people wish existed captured from the BlueSky firehose

https://www.unbuilt.so
1•plural•7m ago•0 comments

Why Software, Not Drones, Will Decide the Next War

https://csis-website-prod.s3.amazonaws.com/s3fs-public/2026-06/260610_Bondar_Defining_Autonomy.pd...
1•tow21•7m ago•1 comments

Ask HN: If 160M Americans are employed, what's the unemployment rate?

1•paganartifact•11m ago•1 comments

Everyone Was Wrong About Maximum Siphon Height [video]

https://www.youtube.com/watch?v=5glksNTKkZI
1•thunderbong•16m ago•0 comments

Why my book can be downloaded for free (2014)

https://blog.plover.com/book/free-hop.html
1•downbad_•16m ago•0 comments

Show HN: Afterburner – Capability-Sandboxed JavaScript/TS Runtime in Rust

https://github.com/afterburner-sh/afterburner
1•vertexclique•18m ago•0 comments

Claude Fable 5 vs. GPT-5.5: better planning, similar execution

https://blog.kilo.ai/p/claude-fable-5-vs-gpt-5-5
2•justiceforsaas•19m ago•0 comments

AI is revolutionising the stock market

https://www.ft.com/content/b31f1e09-5aae-4cad-af15-97adb15dba70
1•thm•20m ago•0 comments

Meta‑Attention Is All You Need

https://medium.com/@vla3728419/meta-attention-is-all-you-need-650a90832d27
1•theorchid•20m ago•0 comments

Qwen 3.6 93B with MTP on 2×RTX 3090 NVLink=187 tokens/SEC,LLM lost bleat-a-thon

https://github.com/Augmented-Reality-Virtual-Reality-AR-VR/P...
3•devilfileprong•21m ago•0 comments

How did Atari apply side art to Arcade Cabinets?

https://arcadeblogger.com/2026/06/14/how-did-atari-apply-side-art-to-arcade-cabinets/
2•msephton•21m ago•0 comments

A text-first social network – No Images, No Videos

https://trendter.com/
1•badz•24m ago•1 comments

Moving Averages (2022)

https://gregorygundersen.com/blog/2022/06/04/moving-averages/
1•tosh•25m ago•0 comments

Shoehorning Flying Toasters into a ESP32-S3

https://taoofmac.com/space/blog/2026/06/14/1400
2•rcarmo•26m ago•0 comments

Brief Notes on Computer Word and Byte Sizes

https://www.cs.columbia.edu/~smb/blog/2023-03/2023-03-07.html
2•jruohonen•27m ago•0 comments

Why Rust does not need OOP

https://belderbos.dev/blog/why-rust-does-not-need-oop/
1•lumpa•28m ago•0 comments

The origins of the AI age /s

https://indiekartik.substack.com/p/the-origins-of-the-ai-age
1•kartik0001•32m ago•0 comments

I built a zero-tab reading workflow for Hacker News

https://gopeek-lovat.vercel.app/blog-hacker-news-workflow.html
5•ofcyes•39m ago•1 comments

The Birth and Death of JavaScript (2014)

https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
23•subset•40m ago•10 comments

China's universities cut 12,000 'obsolete' degrees

https://www.scmp.com/economy/china-economy/article/3356913/chinas-universities-cut-12000-obsolete...
3•the-mitr•41m ago•0 comments

Elon Musk's role was 'instrumental' in the Belfast riots, researchers say

https://www.lemonde.fr/en/international/article/2026/06/13/musk-s-role-was-instrumental-in-the-be...
5•tastyface•42m ago•1 comments

Formal Methods and the Future of Programming

https://blog.janestreet.com/formal-methods-at-jane-street-index/?from_theconsensus=1
2•eatonphil•44m ago•0 comments

The Universe Is Made of Music [video]

https://www.youtube.com/watch?v=j06DGlbwM34
1•rogmash•44m ago•0 comments

Show HN: KBlocker - Linux Productivity Hack

https://github.com/Dan-J-D/kblocker
1•dan-j-d•47m ago•0 comments

Double your Codex / Claude Code productivity and output

https://github.com/tanweai/pua
1•sturza•48m ago•0 comments

Kagi adds Hacker News conversation under links

https://imgur.com/a/S4S0vPX
2•scosman•50m ago•0 comments

Stop Monitoring AI Systems Like Web Services

https://www.newsletter.swirlai.com/p/stop-monitoring-ai-systems-like-web
3•AurimasGr•52m ago•0 comments

Bullet Trains Without Tracks

https://goodcomputer.substack.com/p/bullet-trains-without-tracks
2•d9w•53m ago•0 comments

InferenceFS: Never worry about data again (Again)

https://github.com/philipl/inferencefs/
1•GTP•53m ago•0 comments