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.

Show HN: Sktstreamer for smooth Game with latency on slow mobile networks

https://github.com/sktguha/sktstreamer
1•test1072•40s ago•0 comments

Atlanta Uber Drivers Say Waymo Robotaxis Are Driving Down Their Pay

https://www.axios.com/local/atlanta/2026/08/28/atlanta-rideshare-drivers-union-automation-jobs-pay
1•olives•1m ago•0 comments

VitalChronicle – 100% local, open-source health data analysis

https://github.com/SebRoLENS/google-health-dashboard-ai
1•seb93•2m ago•1 comments

Congratulations on Your Ten Milliseconds

https://www.minid.net/2026/8/31/congratulations-on-your-ten-milliseconds
2•meerita•7m ago•0 comments

Best OLM to PST Converter Tool to Convert Mac OLM to PST

https://apps.microsoft.com/detail/9n7jk7z3546j?hl=en-US&gl=US
1•tieanderson•7m ago•0 comments

Why it matters that President Trump just dialed into a NASA news conference

https://arstechnica.com/space/2026/08/why-it-matters-that-president-trump-just-dialed-into-a-nasa...
1•rbanffy•13m ago•0 comments

Anthropic Sued Over Limits on Its $200-a-Month AI Plans

https://www.wsj.com/tech/ai/anthropic-sued-over-limits-on-its-200-a-month-ai-plans-e2a109e4
2•rzk•15m ago•1 comments

Vijay Pande on running a small fund after running A16Z's $4B bio fund

https://techcrunch.com/2026/08/29/were-not-doing-30-bets-a-year-vijay-pande-on-betting-small-afte...
1•brandonb•18m ago•0 comments

Interviewing IBM's Christian Zoellin and Christian Jacobi

https://chipsandcheese.com/p/hot-chips-2026-interviewing-ibms
1•rbanffy•19m ago•0 comments

Show HN: Highlander – realtime MiniMax FastH3 with audio at $0.02 per second

https://www.highlander.sh/
1•darrow8•22m ago•1 comments

HeyHey

https://heyhey.consti.de
1•con•24m ago•0 comments

What GLM-5.3 Flash running on Chinese hardware means

https://martinalderson.com/posts/glm-5-3-flash-chinese-hardware/
1•birdculture•25m ago•0 comments

Contronym

https://en.wikipedia.org/wiki/Contronym
2•chistev•28m ago•0 comments

Ask HN: What is the next Burning Man in NA?

1•johnnyApplePRNG•28m ago•0 comments

Leica Freedom Train

https://en.wikipedia.org/wiki/Leica_Freedom_Train
2•jacquesm•35m ago•0 comments

Show HN: I tracked 55k free proxies for a week – 1.6% were alive

https://github.com/proxmint/free-proxy-list
1•satineeee•36m ago•0 comments

You Don't Need Blackwells for Realtime Video Generation

https://darrow8.substack.com/p/you-dont-need-blackwells-for-realtime
1•darrow8•38m ago•0 comments

Russian strikes destroy 12M books ahead of Ukraine's first week back at school

https://www.bbc.com/news/articles/cly5v8qmy64o
3•robrain•38m ago•0 comments

AI Lending in Production: Credit Risk,Compliance and Control

https://geekyants.com/blog/building-ai-lending-products-for-production-credit-risk-compliance-and...
1•ahana_537•39m ago•0 comments

SimMR – Sim racing Passthrough with Apple Vision Pro [video]

https://www.youtube.com/watch?v=vwGTDZxNx5w
1•Fr0styMatt88•39m ago•0 comments

Show HN: VajraClaw – Deterministic <1µs execution guardrail for AI agents

https://github.com/Top-Celestial-Company-Ltd/DROS-VajraClaw-Hacker
1•dros_jimmy•42m ago•0 comments

AI, ex-Soviet engineers, and the Holy Grail of rocketry

https://www.fastcompany.com/91563020/aspire-rocket-design-spacex
1•rbanffy•46m ago•0 comments

Libertix installs Linux with 3 mouse clicks for Windows users

https://ekimia.fr/libertix/
1•freechelmi•47m ago•0 comments

Lambs grazing under an Oregon solar farm put on the same weight to the gram

https://spacedaily.com/b-lambs-grazing-under-an-oregon-solar-farm-had-38-percent-less-grass-in-fr...
2•ColinWright•48m ago•0 comments

Early 2000s were peak of humanity

https://lukaszkups.net/notes/early-2000s-were-peak-of-humanity/
5•lukaszkups•49m ago•1 comments

State of the Map 2026: OpenStreetMap conference

https://povesham.wordpress.com/2026/08/30/state-of-the-map-2026-openstreetmap-conference/
1•altilunium•53m ago•0 comments

Email Reactions

https://developers.google.com/workspace/gmail/reactions/format
2•totetsu•54m ago•0 comments

Ask HN: What to do when a vendor doesn't respond to security issues?

2•cudder•55m ago•1 comments

Some Simple Economics of AGI

https://arxiv.org/abs/2602.20946
1•o4c•57m ago•0 comments

Developing iOS Shortcuts and Apps

https://mythofechelon.co.uk/blog/2026/08/17/developing-ios-shortcuts-and-apps
1•tentacleuno•59m ago•0 comments