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•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: Libc-free, direct sys/kernel call language with weird concurrency

https://github.com/DO-SAY-GO/freelang
1•keepamovin•7m ago•0 comments

See You at Y10K: From Millennium Bugs to Quantum Midnight

https://space.gekko.de/from-y2k-to-q-day/
1•ekadagami•17m ago•0 comments

Show HN: Latlng – open-source geospatial object engine written in Rust

https://latlng.cloud/
1•tobilg•18m ago•0 comments

The Mysterious Crypto Judges Who Settle Polymarket Disputes

https://www.wsj.com/finance/polymarket-bet-disputes-fb1b8c6a
2•thm•19m ago•0 comments

The foundations of a provably secure operating system (PSOS) (1979) [pdf]

http://www.csl.sri.com/users/neumann/psos.pdf
4•rurban•24m ago•0 comments

A Node Based Brush Engine – PixiEditor 2.1

https://pixieditor.net/blog/2026/04/30/21-release/
1•axi_n•24m ago•0 comments

Zero Day Clock

https://zerodayclock.com/
1•jonbaer•25m ago•0 comments

Ebola outbreak with uncommon strain erupts in Congo and Uganda; 65 deaths

https://arstechnica.com/health/2026/05/ebola-outbreak-confirmed-in-congo-and-uganda-246-suspected...
2•rbanffy•27m ago•0 comments

An Empty Room: Each voice fades after 21 days

https://www.icried.today/
1•Teever•34m ago•0 comments

Protéger Mastodon contre les bots IA avec Anubis – Techno-Fil et faits divers

https://blogs.gayfr.social/barbapulpe/proteger-mastodon-contre-les-bots-ia-avec-anubis
1•rodrigo975•34m ago•0 comments

Where Are the Vibecoded Photoshops?

https://indiepixel.de/blog/posts/where-are-the-vibecoded-photoshops/
3•gizmo64k•36m ago•0 comments

Open and Free Security Books

https://nocomplexity.com/documents/securityarchitecture/securitylibrary/libraryintro.html#open-an...
1•runningmike•36m ago•1 comments

Safety Paradox: How RLHF Creates the AI Psychosis Problem It's Meant to Prevent

https://www.promptinjection.net/p/ai-psychosis-the-safety-paradox-how-rlhf-creates
1•JustMyNews•39m ago•1 comments

Are modern precision EDC knives worth the premium build cost?

https://www.paragon-knives.com/
1•bgzlsxaz•40m ago•0 comments

Don't Answer the First Question

https://lalitm.com/post/dont-answer-the-first-question/
1•lalitmaganti•43m ago•0 comments

Satellites May Be Driving a Concerning New Form of Atmospheric Pollution

https://thedebrief.org/satellites-may-be-driving-a-concerning-new-form-of-atmospheric-pollution-e...
1•JeanKage•43m ago•0 comments

Balance of Nature

https://en.wikipedia.org/wiki/Balance_of_nature
1•soupspaces•44m ago•0 comments

Fireside Chat with Bjarne Stroustrup at CTO Summit 2025 Hamburg [video]

https://www.youtube.com/watch?v=hqUItF7m3tk
1•pjmlp•49m ago•0 comments

Review: 50 Years of Text Games, by Aaron Reed

https://www.thepsmiths.com/p/review-50-years-of-text-games-by
1•NewCzech•52m ago•0 comments

Multiple commencement speakers booed for AI comments during graduation speeches

https://www.nbcnews.com/video/multiple-commencement-speakers-booed-for-ai-comments-during-graduat...
6•wrxd•52m ago•0 comments

Harmony Infra Ventures Reflects the Leadership of Harmandeep Singh Kandhari

https://sites.google.com/view/harmandeep-singh-kandhari
1•KirtiKKapoor•55m ago•1 comments

Screen record more – Applied Cartography

https://www.jmduke.com/posts/screen-record-more.html
1•rhazn•56m ago•0 comments

The just-say-no engineer was a ZIRP phenomenon

https://www.seangoedecke.com/the-just-say-no-engineer-was-a-zirp-phenomenon/
2•rhazn•56m ago•0 comments

Germany goes from labour shortages to hiring freezes

https://www.ft.com/content/2a6c1cb9-6c11-41c8-a8ea-a367b8799126
14•doener•56m ago•4 comments

From Kubernetes Dev Setup to Production: What Changes

https://georg-schwarz.com/blog/from-kubernetes-demo-to-production-platform/
1•rhazn•57m ago•0 comments

LKML: Linus Torvalds: Linux 7.1-rc4

https://lkml.org/lkml/2026/5/17/896
3•Tomte•1h ago•1 comments

Colombian singer Shakira acquitted of tax fraud in Spain

https://www.reuters.com/world/americas/colombian-singer-shakira-acquitted-tax-fraud-spain-2026-05...
12•fodmap•1h ago•3 comments

Humans are better at coding than AI

https://github.com/Mattbusel/pre_execution_validator
1•Shmungus•1h ago•1 comments

What Is a Risk in Compliance?

https://www.probo.com/blog/2026-05-13-what-is-a-risk-in-compliance
1•gearnode•1h ago•0 comments

I've been shipping 'multi-tenant' wrong for a decade

https://adriacidre.com/blog/multi-tenant-isolation-vs-awareness/
1•kumulo•1h ago•0 comments