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.

The Most Advanced AI Rabbi

https://rebbe.io/
1•Betelbuddy•1m ago•0 comments

Suitable for Taycan Turbo GT model carbon fiber tail

https://www.porsche-km.com/newsinfo/11378510.html
1•edl8888•2m ago•0 comments

AI Shakes Volunteer Sites

https://cacm.acm.org/news/ai-shakes-volunteer-sites/
1•adunk•6m ago•0 comments

Ask HN: Do you still enjoy coding in C++?

1•hasley•6m ago•0 comments

DIY Injection Molding: Making Plastic Recycling Accessible to All

https://www.youtube.com/watch?v=XxiLs3mAZJ8
1•saharshpruthi•9m ago•1 comments

Remount sysfs to make its superblock rw: mount -O remount,rw /sys

https://peng.fyi/post/sysfs-superblock-race/
1•pengubco•17m ago•0 comments

Show HN: Fs-relay – Mount remote folders over HTTP 10x faster than s3fs (Go)

https://jadmadi.net/posts/mounting-remote-directories-over-http/
2•jadmadi•20m ago•0 comments

C64 Demo Effect Explained: The Bumpmapped Rain in Lunatico

https://www.youtube.com/watch?v=F2TkzDaa8A4
1•birdculture•20m ago•0 comments

Show HN: Deterministic 15µs In-Material Lob Shock Damping for CCXT Traders

https://github.com/neoma-pcam/pcam-live
1•neoma001•24m ago•0 comments

Private Mode for Terminal Visibility Reports

https://rockorager.dev/misc/visibility-reports/
1•vinhnx•25m ago•0 comments

Add ARKit blendshapes to MetaHumans via CLI tool

https://holotype.com.sg/news/2026-11-03-bake-arkit-blendshapes-metahuman-dna-cli/
1•nmfisher•28m ago•1 comments

Palestine Action Supreme Court Hearing Day 2

https://www.craigmurray.org.uk/archives/2026/11/palestine-action-supreme-court-hearing-day-2/
2•jjgreen•31m ago•0 comments

OpenIndiana 2026.10 Released with Updated Tools and Compilers, New Apps

https://www.phoronix.com/news/OpenIndiana-2026.10
3•robtherobber•31m ago•0 comments

Porting a Flash game to DOS (without AI) [video]

https://www.youtube.com/watch?v=5r-NeMRsfdw
1•Klaster_1•33m ago•0 comments

Show HN: Glassbrain – Read your agent's brain, know what your agent knows

https://github.com/voidixyn/glassbrain
1•voidixyn•33m ago•1 comments

Borrowing a Microsoft-signed shim to abuse Secure Boot on corporate hardware

https://leosmith.wtf/blog/not-so-secure-boot.html
1•p4p1•34m ago•1 comments

Show HN: Software Job Title Family Tree

https://ianmiell.github.io/sw-job-title-family-tree/
1•zwischenzug•38m ago•0 comments

The Who Cares Era (2025)

https://dansinker.com/posts/2025-05-23-who-cares/
1•zenincognito•44m ago•0 comments

Soviet Disunion

https://worksinprogress.co/issue/soviet-disunion/
2•baud147258•47m ago•0 comments

Ver: A new spring for version control

https://ver-vcs.net/blog/a-new-spring-for-version-control/
1•itsclelia•49m ago•1 comments

Diamond Foundry Presents 200-Mm Single-Crystal Diamonds Wafer

https://www.igorslab.de/en/diamond-foundry-200mm-single-crystal-diamonds-ai-cooling/
1•giuliomagnifico•51m ago•0 comments

Chainalysis Security Incident Information

https://www.chainalysis.com/blog/security-incident-october-30/
1•langitbiru•53m ago•0 comments

Asset flips and vibes: fifteen years of videogames as a preview of the LLM era

https://www.hypertesto.me/en/blog/2026/10/asset-flips-and-vibes
1•SpeckToTaste•54m ago•0 comments

PDM: Time-series forecasting models with 6M–119M parameters

https://www.flashmind.com/en/research/introducing-pdm
2•captain_dfx•54m ago•0 comments

Show HN: A lightweight RAG evaluator with golden-set metrics

https://github.com/infrixo-systems/rag-evaluation-starter
1•steadystate•58m ago•0 comments

STMicroelectronics streamlines AI model development for STM32 developers

https://newsroom.st.com/media-center/press-item.html/stmicroelectronics-streamlines-ai-model-deve...
2•teleforce•1h ago•0 comments

Claude Opus 5.5 Beats GPT-6 Astra in the Newest EDA Benchmark Leaderboard

https://deepsense.ai/blog/eda-benchmark-leaderboard-october-28th-2026/
3•nvmdbljstm•1h ago•0 comments

Coordinated disturbances haunt grids worldwide

https://techcrunch.com/2026/11/08/coordinated-disturbances-haunt-grids-worldwide-heres-how-resear...
3•tippa123•1h ago•0 comments

Show HN: Control Layer Demo for AI Coding Agents

https://github.com/MintCoderpro/mintigate-demo
1•MintCoder•1h ago•0 comments

The Evaluation-Industrial Complex

https://twitter.com/xeophon/status/2119563291412578575
1•nlpnerd•1h ago•1 comments