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.

What the Greeks Would Call Our Government [video]

https://www.youtube.com/watch?v=205IdzGJMJs
1•verdverm•56s ago•0 comments

Orion2re: A restoration effort for the Master of Orion II game engine

https://github.com/orion2re/orion2re/
1•JohnHammersley•2m ago•0 comments

AI's mathematics blitz pushes science into new territory

https://www.economist.com/science-and-technology/2026/10/12/ais-mathematics-blitz-pushes-science-...
1•sbulaev•2m ago•0 comments

Agentic BSS Explained: AI-Native Model, Architecture and Use Cases [pdf]

https://framerusercontent.com/assets/PKpdXtv0xAf0e4W4M53D2pUDpzg.pdf
2•y2so•3m ago•0 comments

Janas: Run LLMs larger than RAM by streaming experts from SSD

https://github.com/prabanta-dev/janas
1•khalidkhair•3m ago•0 comments

The CEO's of Broadcom and Intel Say the Quiet Part Out Loud about AI and ROI

https://wolfstreet.com/2026/10/12/ceos-of-broadcom-intel-say-the-quiet-part-out-loud-about-ai-and...
2•metadat•4m ago•0 comments

Making DNA: The Quest for Synthetic Life (2023)

https://www.asimov.press/p/dna
1•Eridanus2•7m ago•0 comments

Mozilla Welcomes Raffi Krikorian as Chief Technology Officer

https://blog.mozilla.org/en/mozilla/leadership/mozilla-welcomes-raffi-krikorian-chief-technology-...
2•greatgib•7m ago•1 comments

Artificial Intelligence in the Firm: Bottlenecks in Software Production [pdf]

https://fion.ac/jellyfish.pdf
1•EA-3167•8m ago•0 comments

Using Jev to make your agents write the code and design the app the way you do

https://blog.a7ul.com/agents-code-your-way.html
1•atulfiled•10m ago•0 comments

How to Win a Nobel Prize

https://onwisconsin.uwalumni.com/how-to-win-a-nobel-prize/
1•joebig•10m ago•0 comments

Covert Signaling Channel Between Air-Gapped Computers Using Thermal Manipulation

https://arxiv.org/abs/1503.07919
1•cthackers•10m ago•0 comments

Abliterated models can get you pwned

https://projectdiscovery.io/research/how-abliterated-models-can-get-you-pwned
1•cthackers•12m ago•0 comments

Show HN: Chkit – Schema, migrations and backfills for ClickHouse (like Drizzle)

https://github.com/obsessiondb/chkit
3•keks0r•13m ago•0 comments

Linux enthusiasts see 10-second kernel compilation times on the horizon

https://www.tomshardware.com/software/linux/linux-enthusiasts-see-10-second-kernel-compilation-ti...
1•mushstory•14m ago•0 comments

Ask HN: Are there any chat app around personal photos?

2•cpt100•17m ago•0 comments

How much semantic structure survives in a 32-dimensional sketch?

https://zenodo.org/records/22562016
1•andrespi•19m ago•0 comments

Epic Reportedly Pushing Devs to Use AI, Delays Star Wars and Marvel Shooter

https://www.ign.com/articles/epic-reportedly-pushing-devs-to-use-ai-delays-secret-star-wars-and-m...
4•password54321•22m ago•1 comments

KnightOS was an interesting operating system

https://drewdevault.com/blog/KnightOS-was-interesting/
1•birdculture•23m ago•0 comments

Ukrainian strikes on Yandex data centres caused Russian bot activity to plummet?

https://www.euronews.com/2026/10/12/did-ukrainian-strikes-on-yandex-data-centres-cause-russian-bo...
2•YZF•25m ago•1 comments

Trump Just Started the Debt Spiral [video]

https://www.youtube.com/watch?v=g1kgEiP1v10
2•Bender•27m ago•0 comments

Hello Python 3.15, goodbye 3.10, and now I can use 3.11

https://simonwillison.net/2026/Oct/12/python-3-15/
1•elffjs•27m ago•0 comments

Checking agent actions before they run

https://rebuno.io/blog/agent-guardrails
1•nnww•28m ago•0 comments

Vellum: A web engine in Minecraft for rendering modded GUIs

https://github.com/maxleiter/vellum
2•MaxLeiter•29m ago•0 comments

AI Is a Tool. Using It Well Takes Skill.

https://yyhh.org/blog/2026/10/ai-is-a-tool/
43•layer8•29m ago•19 comments

Phreak.ing – Internet Phone Switch

https://phreak.ing/
8•rickcarlino•30m ago•0 comments

Show HN: Turn spoken thoughts into system design diagrams

https://github.com/triggeredcode/lucid
1•triggered_code•30m ago•0 comments

Hit 10 wks and 1k players with a vibecoded MMO

https://www.eldermyr.com/play
1•tipsy_pipsqueak•31m ago•1 comments

Brachistochrone Curve

https://en.wikipedia.org/wiki/Brachistochrone_curve
2•EndXA•31m ago•0 comments

Name Shame

https://tedium.co/2026/10/09/nominative-antideterminism-history/
1•aray07•31m ago•0 comments