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

Comments

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

Six Selfish Reasons to Have Kids

https://kevinkelly.substack.com/p/six-selfish-reasons-to-have-kids
1•surprisetalk•2m ago•0 comments

The MIT Flea Swapfest 2026 Dates

https://web.mit.edu/w1mx/www/swapfest/flyer-2026.txt
1•oldnetguy•2m ago•0 comments

Ask HN: Optimizing Claude Code Workflow: Subscription or API Billing?

1•robeym•2m ago•0 comments

N times faster than C, Arm edition (2023)

https://blog.xoria.org/n-times-faster/
1•surprisetalk•2m ago•0 comments

Trapped in MS Office

https://ia.net/topics/trapped-in-ms-office
1•surprisetalk•2m ago•0 comments

Why haven't π±e, 2^e, π^e, or π^(√2) been shown to be irrational?

https://old.reddit.com/r/math/comments/d6xvk/why_havent_%CF%80e_2e_%CF%80e_or_%CF%802_been_shown_...
1•surprisetalk•2m ago•0 comments

We Tried Sitting on the Floor for 5 Years and Here's What Happened [video]

https://www.youtube.com/watch?v=L_9oU88UH_I
1•airstrike•3m ago•0 comments

Show HN: Gui.new – The Visual Layer for AI

https://gui.new
2•mynameisntbob•3m ago•0 comments

Ask HN: What is your current Agentic and/or Vibe coding setup?

1•sschueller•4m ago•0 comments

Black vs. White Gloss Chest: Pick a Tone to Match Your Style

https://dreamhomestore.co.uk/collections/chest-of-drawers
1•kevinwalton•5m ago•1 comments

Click-to-Release Strategy to Control Bond Cleavage and Prodrug Activation

https://onlinelibrary.wiley.com/doi/10.1002/anie.202515594
1•PaulHoule•6m ago•0 comments

Forge – OpenClaw for Enterprise

https://github.com/initializ/forge
1•ibreakthecloud•6m ago•0 comments

Sutton and Barto, Ch. 11: Off-Policy Methods with Approximation (Personal Notes)

https://chizkidd.github.io//2026/03/09/rl-sutton-barto-notes-ch011/
1•ibobev•8m ago•0 comments

Rebasing in Magit

https://entropicthoughts.com/rebasing-in-magit
2•ibobev•10m ago•0 comments

Vibe Coding: Build Fast, Think Slow

https://www.ssp.sh/brain/vibe-coding/
1•articsputnik•12m ago•0 comments

BullshitBench: Models Answering Nonsense Questions

https://petergpt.github.io/bullshit-benchmark/viewer/index.html
1•cebert•13m ago•0 comments

What happens when AI mediates everything?

1•spamsch•13m ago•1 comments

Stop Prompting. Start Approving

https://www.sustn.app/
2•mooreds•15m ago•0 comments

Show HN: Üben – Free offline app for drilling German noun articles (der/die/das)

https://uben.westmorelandcreative.com
1•richard_w•15m ago•0 comments

Is iCloud's Free tier still 5GB since 2011?

https://www.isicloud5gb.lol/
1•vashchylau•15m ago•0 comments

Self-hosted TTS proxy and voice manager

https://github.com/celanthe/clarion
1•mooreds•16m ago•0 comments

Germany's Solar Boom Eases Power Costs as Gas Price Jumps

https://www.bloomberg.com/news/articles/2026-03-06/germany-s-solar-boom-eases-power-costs-as-gas-...
10•toomuchtodo•16m ago•3 comments

After outages, Amazon to make senior engineers sign off on AI-assisted changes

https://arstechnica.com/ai/2026/03/after-outages-amazon-to-make-senior-engineers-sign-off-on-ai-a...
2•ndr42•17m ago•3 comments

Show HN: Star SDK – Fixing the 3 biggest annoyances with generated browser games

https://github.com/buildwithstar/star-sdk
1•rzendacott•17m ago•0 comments

Sending Jabber/XMPP Messages via HTTP

https://gultsch.de/posts/xmpp-via-http/
3•inputmice•19m ago•0 comments

Hisense TVs add unskippable startup ads before live TV

https://www.guru3d.com/story/hisense-vidaa-tvs-reportedly-add-unskippable-startup-ads-before-live...
15•akyuu•21m ago•12 comments

Re-architecting End-host Networking with CXL

https://danglingpointers.substack.com/p/re-architecting-end-host-networking
2•blakepelton•22m ago•0 comments

Should I be worried or reassured that my taxi driver isn't wearing a seat belt?

https://marginalrevolution.com/marginalrevolution/2026/03/advantageous-selection.html
1•mhb•22m ago•0 comments

Show HN: Sites that publish instantly and expire if unclaimed

https://unulu.ai/for-humans
2•zeebs•24m ago•2 comments

Yann LeCun's AI startup raises $1B seed round

https://www.bloomberg.com/news/articles/2026-03-10/yann-lecun-s-new-ai-startup-raises-1-billion-i...
2•brandonb•24m ago•2 comments