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.

789 KB Linux Without MMU on RISC-V (2023)

https://popovicu.com/posts/789-kb-linux-without-mmu-riscv/
1•pabs3•1m ago•0 comments

Metamath C

https://github.com/digama0/mm0/blob/master/mm0-rs/mmc.md
1•smj-edison•2m ago•0 comments

Chimpanzees' bloody 'civil war' may offer insight into human conflict

https://www.thetimes.com/uk/science/article/chimpanzee-group-splits-bloody-civil-war-59dk6swzr
1•petethomas•3m ago•0 comments

Crude: The Journey Of Oil (2007) [video]

https://www.youtube.com/watch?v=I7bmUYxwcaQ
1•measurablefunc•4m ago•0 comments

Borrow-Checking Surprises

https://www.scattered-thoughts.net/writing/borrow-checking-surprises/
1•jamii•9m ago•0 comments

Mayflower hero was sold into slavery, hidden files reveal

https://www.thetimes.com/world/europe/article/mayflower-hero-squanto-malaga-spain-sjx8sbvpv
1•petethomas•10m ago•0 comments

A Trip Through the Graphics Pipeline

https://alaingalvan.gitbook.io/a-trip-through-the-graphics-pipeline
1•sph•13m ago•0 comments

Bug in original PageRank paper (1998) [pdf]

https://www.cis.upenn.edu/~mkearns/teaching/NetworkedLife/pagerank.pdf
1•Abhavk•17m ago•1 comments

'Project Hail Mary' Directors Announce In-Theater Director Commentary Track

https://thatparkplace.com/project-hail-mary-commentary-track/
1•canucker2016•18m ago•1 comments

Moving from academic to industry career plans: A personal story

https://sites.lsa.umich.edu/math-graduates/2020/09/15/moving-from-academic-to-industry-career-pla...
1•ganitam•26m ago•0 comments

Why I quit "The Strive"

https://www.joanwestenberg.com/why-i-quit-the-strive/
1•zdw•26m ago•0 comments

Vulnpocalypse: AI, Open Source, and the Race to Remediate

https://www.resilientcyber.io/p/vulnpocalypse-ai-open-source-and
1•chillax•27m ago•0 comments

YouTube locked my accounts and I can't cancel my subscription

https://pocketables.com/2026/04/ai-music-corporate-control-and-the-creator-who-cant-even-leave.html
2•digitalhigh•27m ago•0 comments

PeerDrop – P2P file sharing across devices

https://github.com/jj10133/PeerDrop
2•jj_3•30m ago•1 comments

Eyes on the Solar System – Artemis

https://eyes.nasa.gov/apps/solar-system/
1•memalign•32m ago•0 comments

Negative effects of artificial sweeteners may pass on to next generation

https://www.eurekalert.org/news-releases/1121524
1•XzetaU8•32m ago•0 comments

Show HN: Shell-MCP A persistent terminal for AI- CD, env vars,and nvm carry over

2•prasanthsd•34m ago•0 comments

Explaining the Most Important Artemis II Photos [video]

https://www.youtube.com/watch?v=oaXRREHVkHo
1•Orochikaku•36m ago•0 comments

RoboPhD: Evolving complex agents under tight budgets

https://arxiv.org/abs/2604.04347
2•azhenley•36m ago•0 comments

States Are Learning the Wrong Lesson from the 'Mississippi Miracle'

https://www.theatlantic.com/ideas/2026/04/mississippi-education-miracle/686731/
1•JumpCrisscross•37m ago•1 comments

$190M Settlement in Facebook User-Privacy Case Wins Approval in Delaware Court

https://www.law.com/therecorder/2026/04/08/190m-settlement-in-facebook-user-privacy-case-wins-app...
3•1vuio0pswjnm7•40m ago•0 comments

Ask HN: Apple terminated my membership while converting it to an organization

4•creepy•44m ago•0 comments

GitHub Copilot – Community-contributed agents, instructions, and skills

https://awesome-copilot.github.com/
2•ms7892•45m ago•0 comments

Slipping up Slippi with spectator RCE

https://khang06.github.io/slippirce/
1•khangaroo•47m ago•0 comments

First man convicted under Take It Down Act kept making AI nudes after arrest

https://arstechnica.com/tech-policy/2026/04/first-man-convicted-under-take-it-down-act-kept-makin...
5•tzs•50m ago•0 comments

Reverse-engineering an encrypted IoT protocol

https://smlx.dev/posts/goodwe-sems-protocol-teardown/
2•swq115•52m ago•0 comments

MemPalace – A Masterclass in Grifting

https://twitter.com/AdvicebyAimar/status/2041559354034344438
3•doppp•54m ago•0 comments

A Minecraft mod that reveals the Alpha world under bedrock

https://multision.dev/alphabelow/
2•EvilGoose•56m ago•0 comments

Scaling AI is now constrained by energy, cooling and physics

https://blog.se.com/digital-transformation/artificial-intelligence/2026/02/13/scaling-ai-in-the-r...
2•latentframe•1h ago•2 comments

Book Review: Savage Money (2024)

https://entropicthoughts.com/book-review-savage-money
1•kqr•1h ago•0 comments