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•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.

My First Game, Shadow Dungeon (Procedural Roguelike)

https://dynaq.itch.io/shadow-dungeon
1•mik09•1m ago•0 comments

Ball Simulator in Python Made with Claude

https://github.com/simin75simin/ball-sandbox
1•mik09•5m ago•1 comments

Google's Own AI Researchers Jockey for Access to Its Computing

https://www.bloomberg.com/news/articles/2026-05-18/google-s-own-ai-researchers-jockey-for-access-...
1•osnium123•12m ago•0 comments

Have I Been Pwned: Colombian fintech company leaks 34.5M accounts in March 2026

https://haveibeenpwned.com/Breach/ADDI
1•guessmyname•14m ago•0 comments

Do Androids Dream of Your Electric Life?

https://medium.com/@vektormemory/do-androids-dream-of-your-electric-life-4c2c439ab0aa
1•vektormemory•16m ago•0 comments

Language Registries Are Unstable by Default

https://nesbitt.io/2026/05/15/language-registries-are-unstable-by-default.html
1•pabs3•19m ago•0 comments

Retrospective on DDIA

https://www.khola.blog/p/designing-data-intensive-applications
1•bcapchickadee•20m ago•0 comments

The American Rebellion Against AI Is Gaining Steam

https://www.wsj.com/tech/ai/the-american-rebellion-against-ai-is-gaining-steam-94b72529
4•JaakkoP•21m ago•1 comments

New features in GCC 16: Improved error messages and SARIF output

https://developers.redhat.com/articles/2026/04/28/gcc-16-improved-error-messages-sarif-output
1•siteshwar•22m ago•0 comments

A shallow dive into formal verification

https://vitalik.eth.limo/general/2026/05/18/fv.html
2•wslh•23m ago•0 comments

Reverse Lookup and AI-Powered Osint

https://sherlockeye.io/
1•mrzenodd•31m ago•0 comments

The Coming Food Crisis in South Asia

https://thediplomat.com/2026/05/the-coming-food-crisis-in-south-asia/
3•panny•37m ago•0 comments

The last six months in LLMs in five minutes

https://simonwillison.net/2026/May/19/5-minute-llms/
5•yakkomajuri•42m ago•0 comments

Surface owner loses their limited 50th Anniversary edition after a repair swap

https://www.windowscentral.com/hardware/surface/this-surface-owner-lost-their-limited-50th-annive...
2•Oblivion8442•42m ago•0 comments

Nitsum: Serving Tiered LLM Requests with Adaptive Tensor Parallelism

https://mlsys.wuklab.io/posts/nitsum/
1•matt_d•48m ago•0 comments

SuperInfer: SLO-Aware Rotary Scheduling and Memory Management for LLM Inference

https://supercomputing-system-ai-lab.github.io/projects/superinfer/
1•matt_d•49m ago•0 comments

What can a local model do for you in early May 2026?

https://manichord.com/blog/posts/what-can-local-model-do-in-may-2026
2•mkss•52m ago•1 comments

Guess where someone works based on their profile picture

https://tools.crustdata.com/guessthecompany
1•mhi3•56m ago•0 comments

Sony Pulls Back from PlayStation Games on PC

https://www.bloomberg.com/news/articles/2026-03-04/sony-pulls-back-from-playstation-games-on-pc
1•embedding-shape•57m ago•1 comments

Museum of Innocence (Museum)

https://en.wikipedia.org/wiki/The_Museum_of_Innocence_(museum)
2•brudgers•59m ago•0 comments

Video GTP

https://www.neotube.ai/
1•walkervin•1h ago•0 comments

BudgetBites – AI meal planning app that helps you save money on groceries

https://budgetbites.website/login
2•ClarenceJackson•1h ago•0 comments

Make products AI agents want

https://anitakirkovska.com/blog/make-products-ai-agents-want/
1•anitakirkovska•1h ago•0 comments

Google, Blackstone plan AI cloud venture with $5B backing, WSJ reports

https://www.reuters.com/business/google-blackstone-create-new-ai-cloud-company-wsj-reports-2026-0...
1•ndesaulniers•1h ago•0 comments

We should stop using Agile and Waterfall as is

https://quantumentangled.dev/viewpost/12/we-should-stop-using-agile-and-waterfall-asis
1•rulyone•1h ago•0 comments

Feedback on my S&P 500 Search Tool (fast search by name, ticker, sector)

https://sp500-search.streamlit.app/
1•gilthor•1h ago•0 comments

Will the Indus Valley script ever be deciphered?

https://www.livescience.com/archaeology/will-the-indus-valley-script-ever-be-deciphered
1•redwood•1h ago•1 comments

May I recommend eww for Emacs's innovative UI?

https://www.matem.unam.mx/~omar/apropos-emacs.html#may-i-recommend-eww-for-emacs-innovative-ui
2•birdculture•1h ago•0 comments

Google and Blackstone to Create New AI Cloud Company

https://www.wsj.com/tech/ai/google-and-blackstone-to-create-new-ai-cloud-company-0e35b91f
5•frays•1h ago•0 comments

Self-Hosted Web Application for Displaying and Interacting with KiCad Projects

https://github.com/krishna-swaroop/KiCAD-Prism
1•djfergus•1h ago•0 comments