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.

Florida Catholics slap down state AG by rejecting religious vaccine exemptions

https://arstechnica.com/health/2026/08/catholic-bishops-tell-florida-theres-no-religious-reason-f...
1•leephillips•1m ago•0 comments

Chinese AI Models Overtake American Rivals in Popularity

https://techstrong.ai/articles/chinese-ai-models-overtake-american-rivals/
2•CrankyBear•1m ago•0 comments

Apple turns the new Mac Mini into a claymation superhero

https://www.thedrum.com/news/ad-of-the-day-apple-turns-the-new-mac-mini-into-a-claymation-superhero
1•joshcsimmons•3m ago•0 comments

The Singular Viable Product

https://www.nyn.me/blog/the-singular-viable-product
1•speckx•4m ago•0 comments

Git-Ark – I almost lost a month of IP, so I built a secure backup vault

https://github.com/boomctl/git-ark
1•hackerbob1•4m ago•0 comments

Dyna-2: A 1M-Hour Scaling Law for World-Action Models

https://www.dyna.co/dyna-2
1•gmays•6m ago•0 comments

US Says CN Hackers Broke into Justice Department, NASA, Federal Reserve, Senate

https://www.reuters.com/world/china/china-sponsored-hacking-platforms-seized-by-us-justice-depart...
2•Teever•6m ago•0 comments

Show HN: ASOGrade – App Store keyword research using Apple Search Ads demand

https://asograde.com
1•ashwinn11•6m ago•0 comments

Euphemisation of Taboo Areas [pdf]

https://ajmp.uwr.edu.pl/wp-content/uploads/sites/39/2023/12/10_Kleparski.pdf
1•Eridanus2•7m ago•0 comments

Vast Space – the artificial gravity bet that could unlock deep space

https://beyondhorizonforesight.substack.com/p/vast-space-the-artificial-gravity
1•beyondhorizonfs•8m ago•0 comments

Teaching AI to Read a Map

https://research.google/blog/teaching-ai-to-read-a-map/
1•mattrighetti•10m ago•0 comments

Ultraspherical

https://www.johndcook.com/blog/2026/08/26/ultraspherical/
1•ibobev•11m ago•0 comments

Numerical (In)Stability of Recurrence Relations

https://www.johndcook.com/blog/2026/08/24/numerical-instability-recurrece/
1•ibobev•12m ago•0 comments

Three-Term Recurrences

https://www.johndcook.com/blog/2026/08/24/three-term-recurrences/
2•ibobev•12m ago•0 comments

Mark Zuckerberg Wants to Make Sure His Competitors Share His Pain

https://www.nytimes.com/2026/08/27/technology/meta-settlement-mark-zuckerberg-youtube-tiktok.html
5•aaraujo002•14m ago•2 comments

Why Did Stripe Acquire an AI Model Routing Company?

https://thefinancialengineer.substack.com/p/why-did-stripe-acquire-an-ai-model
4•gemanor•15m ago•0 comments

Lockstep: Can a language model run a logic circuit in its head?

https://lockstep.greg.technology/
2•gregsadetsky•17m ago•0 comments

Formalization of the Solution to the Hopf Problem

https://github.com/plby/HopfProblem
2•robinhouston•17m ago•0 comments

You are not a model. Don't price per token

https://twitter.com/sarahdingwang/status/2092976778164011481
2•tosh•18m ago•0 comments

A phone call that saves lives

https://www.gatesnotes.com/heroes/heroes-home-topic/reader/heroes-in-the-field-m-mama
2•mooreds•18m ago•0 comments

Agents still can't automate Excel

https://www.orcaset.com/blog/agents-still-can-t-automate-excel
3•jrdnh•19m ago•0 comments

Show HN: IdeaKache – Ideas Worth Holding Onto

https://ideakache.com
3•jcowcher•20m ago•1 comments

Loop Engineering

https://addyo.substack.com/p/loop-engineering
2•fagnerbrack•21m ago•0 comments

Why HPSC Is a Big Deal for Space Exploration

https://www.windriver.com/blog/Why-HPSC-Is-a-Big-Deal-for-Space-Exploration
2•mooreds•21m ago•0 comments

Markdown Database Pattern

https://wayofmarkdown.com/markdown-database
3•rufuspollock•21m ago•0 comments

Codefrens – Two strangers. One problem

https://codefrens.com/
2•dyftvugj•22m ago•0 comments

Want to listen better? Turn down your thoughts and tune in to others

https://text.npr.org/974786825
4•mooreds•22m ago•1 comments

Apple upgrades M4 Mac mini orders to M6, M5 Pro at no additional cost

https://www.macrumors.com/2026/08/26/apple-free-mac-mini-upgrade-email/
3•alwillis•24m ago•0 comments

Small Models Have Arrived

https://calv.info/small-models-have-arrived
2•tosh•25m ago•0 comments

Cocomelon's Studio Tells Its Artists to Start Experimenting with AI

https://www.404media.co/cocomelons-studio-tells-its-artists-to-start-experimenting-with-ai/
2•cdrnsf•25m ago•0 comments