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•11mo ago

Comments

zoezoezoezoe•11mo 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•11mo 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.

Long Covid Diagnostic Out of Stanford

https://join.muno.bio/
1•limalabs•4m ago•0 comments

Forsp: A Forth+Lisp hybrid lambda calculus language (2024)

https://xorvoid.com/forsp.html
1•HeliumHydride•5m ago•0 comments

The Art of the Fictional Pop Song

https://www.newyorker.com/culture/pop-music/the-art-of-the-fictional-pop-song
1•fortran77•6m ago•0 comments

America Lost the Mandate of Heaven

https://geohot.github.io//blog/jekyll/update/2026/04/18/america-mandate-of-heaven.html
1•mefengl•8m ago•0 comments

Claude Opus wrote a Chrome exploit for $2,283

https://www.theregister.com/2026/04/17/claude_opus_wrote_chrome_exploit/
1•Mohansrk•9m ago•0 comments

Purdue University CS240 Class over 50% of students 'caught' using AI on homework

https://old.reddit.com/r/Purdue/comments/1sogfb4/comment/ogsvymy/
1•twaldin•14m ago•1 comments

Unweight: Lossless MLP Weight Compression for LLM Inference

https://research.cloudflare.com/nikulin2026/
2•jgrahamc•15m ago•0 comments

Helpmate-Live, Social and AI Chat with Built-In CRM for WordPress

1•RhapsodyPlugins•20m ago•0 comments

Show HN: A delivery gate that automatically releases files when invoice is paid

1•pixelatedRudy•21m ago•0 comments

GloraMD Face Lift Serum

https://www.facebook.com/GloraMDFaceLiftSerumUS
1•bbangerr•23m ago•0 comments

I made a self-employed expense keeper

https://bizlect.com
1•ispaceman•23m ago•0 comments

Garry Tan – On the LOC Controversy

https://twitter.com/garrytan/status/2045404377226285538
1•helloplanets•23m ago•0 comments

48 domains produce 22.5% of ChatGPT's B2B citations

https://growtika.com/blog/chatgpt-citation-economy
2•Growtika•28m ago•0 comments

Soul.md – open file format for AI agent identity

https://github.com/AntonioTF5/soul-spec
1•afonie•30m ago•0 comments

Eating fruits, vegetables and whole grains may increase chance of lung cancer

https://news.keckmedicine.org/eating-fruits-vegetables-and-whole-grains-may-increase-chance-of-ea...
3•geox•33m ago•2 comments

F1 in China: I've never seen so many people in those grandstands

https://arstechnica.com/cars/2026/03/f1-in-china-ive-never-seen-so-many-people-in-those-grandstands/
1•PaulHoule•37m ago•0 comments

The agent that grows with you

https://hermes-agent.nousresearch.com/
1•sponno•37m ago•0 comments

A simple LinkedIn prospecting trick that improved our lead quality

https://www.indiehackers.com/post/a-simple-linkedin-prospecting-trick-that-improved-our-lead-qual...
1•YashNetworkHQ•39m ago•0 comments

New wave of immunotherapy is eliminating cancers

https://www.bbc.com/future/article/20260410-how-a-new-wave-of-immunotherapy-is-eliminating-cancers
1•andsoitis•39m ago•0 comments

Copilot Key on My Keyboard

https://github.com/Rast1234/copilot_key_on_my_keyboard/blob/master/README.md
1•rast1234•40m ago•0 comments

Linux 7.1 just killed one of dual-booting's biggest headaches

https://www.xda-developers.com/linux-71-just-killed-one-of-dual-bootings-biggest-headaches/
3•y1n0•40m ago•0 comments

We beat Google's zero-knowledge proof of quantum cryptanalysis

https://blog.trailofbits.com/2026/04/17/we-beat-googles-zero-knowledge-proof-of-quantum-cryptanal...
1•EvgeniyZh•41m ago•0 comments

Father of man who inspired Super Mario was also named Luigi

https://www.theguardian.com/games/2026/apr/18/super-mario-nintendo-luigi-inspiration
1•y1n0•41m ago•0 comments

Why don't we just ask AI to write assembler?

2•canterburry•42m ago•2 comments

Venture capitalist Ron Conway says he has 'rare' cancer

https://sfstandard.com/2026/04/17/ron-conway-venture-capitalist-cancer-treatment/
1•littlexsparkee•47m ago•0 comments

How do I get better at first-person shooters?

https://www.mothership.blog/how-do-i-get-better-at-first-person-shooters/
1•Julesprobably•48m ago•0 comments

Claude Didn't Write This

https://blog.mfc83.io/blog/claude-didnt-write-this/
2•afro88•48m ago•0 comments

Humanoid Half-Marathon

https://observervoice.com/beijings-humanoid-half-marathon-training-a-grueling-challenge-200020/
1•ggraphilia•1h ago•0 comments

Sequencing DNA at Home Locally on a DGX Spark and Mac Studio

https://twitter.com/sethshowes/status/2045289299269070978
3•jonbraun•1h ago•0 comments

US-sanctioned currency exchange says $15M heist done by "unfriendly stat

https://arstechnica.com/security/2026/04/russia-friendly-exchange-says-western-special-service-be...
1•joozio•1h ago•1 comments