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

Comments

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

Mistral API is degrading [04/2026]

https://status.mistral.ai/incidents/page/1
1•rawland•1m ago•0 comments

Ask HN: Can you show me some useful AI-written programs?

2•nananana9•2m ago•0 comments

Air Is Full of DNA

https://www.nature.com/articles/d41586-026-01099-2
3•howrude•4m ago•0 comments

Mapping India's homegrown AI ecosystem – 110 apps, 22 languages, 28 sectors

https://github.com/suyash333/india-ai-ecosystem
1•golearnsap•6m ago•0 comments

I found out the hard way that Linux is not a dad-friendly gaming OS

https://www.pcgamer.com/hardware/i-found-out-the-hard-way-that-linux-is-not-a-dad-friendly-gaming...
3•evo_9•11m ago•1 comments

Israel kills two UNICEF water truck drivers in Gaza

https://www.unicef.org/press-releases/statement-unicef-killing-two-water-truck-drivers-gaza-strip-0
4•lr0•20m ago•0 comments

_Generic Printf() in Standard C23

https://codeberg.org/Flying-Toast/gprintf
1•flying-toast•30m ago•0 comments

Kazakhstan still relies on its ageing industrial giants

https://mondediplo.com/2026/04/14kazakhstan
1•JumpCrisscross•31m ago•0 comments

Show HN: How Are You-elderly fall detection app I built solo with AI in 6 months

2•sminchev•32m ago•2 comments

Show HN: A Roman fable about a PHP suite that exposed 100 tables in 3 days

https://marius-ciclistu.medium.com/list/the-api-grand-prix-486dc1becb36
1•marius-ciclistu•33m ago•0 comments

Mysterious figure has summited Sphere in Las Vegas: It appears it's Alex Honnold

https://www.sfgate.com/travel/article/alex-honnold-sphere-las-vegas-22212813.php
2•bookofjoe•34m ago•1 comments

A Chrome extension that redesigns Hacker News in an editorial style

https://github.com/puppe1990/redesign-hacker-news
1•puppe1990•35m ago•0 comments

A Hidden Language: The Meaning of Semaphore

https://www.offshoresupply.co.uk/blog/a-hidden-language-the-meaning-of-semaphore/
1•Eridanus2•35m ago•0 comments

Observability Stack – AI First?

1•jblake•47m ago•0 comments

Any Color You Like: NIST Scientists Create 'Any Wavelength' Lasers

https://www.nist.gov/news-events/news/2026/04/any-color-you-nist-scientists-create-any-wavelength...
5•rbanffy•49m ago•0 comments

Show HN: Reliably Incorrect – explore LLM reliability with data visualizations

https://adamsohn.com/reliably-incorrect/
2•dataviz1000•49m ago•3 comments

The Destroyed Remnants of a Lost World Are Falling to Earth, Scientists Discover

https://www.404media.co/the-destroyed-remnants-of-a-lost-world-are-falling-to-earth-scientists-di...
3•Brajeshwar•53m ago•0 comments

Vynly an AI-only social feed with provenance checks (beta)

https://vynly.co
1•nftdude2024•54m ago•0 comments

SDF Public Access Unix System

https://sdf.org/?ssh
2•neehao•54m ago•0 comments

Open-source Firecracker microVM orchestrator

https://github.com/sahil-shubham/bhatti
2•davidcollantes•55m ago•0 comments

Tinypki: Easy to use software for local CA/PKI management

https://github.com/icedevml/tinypki
2•msm_•58m ago•0 comments

Eating more fruits and vegetables tied to unexpected lung cancer risk

https://www.sciencedaily.com/releases/2026/04/260417224454.htm
1•amichail•58m ago•0 comments

How (and why) we rewrote our production C++ front end infrastructure in Rust

https://blog.nearlyfreespeech.net/2026/04/17/how-and-why-we-rewrote-our-production-c-frontend-inf...
2•maxloh•1h ago•0 comments

Optimizing Ruby Path Methods

https://byroot.github.io/ruby/performance/2026/04/18/faster-paths.html
6•weaksauce•1h ago•0 comments

Wishes for Ron Conway

https://om.co/2026/04/18/wishes-for-ron-conway/
3•rmason•1h ago•0 comments

Show HN: Coelanox – auditable inference runtime in Rust (BERT runs today)

https://www.coelanox.com/
1•Shark1n4Suit•1h ago•0 comments

Scrolly AI: knows you better than you know yourself

https://zorkman.substack.com/p/scrolly
2•zorkman•1h ago•0 comments

The largest collection of black markers

https://www.prune.dirt.fyi/p/prune-getting-high-on-your-own-supply
2•zeech•1h ago•0 comments

Nuke Engineer Rants

https://nukerants.fi/index.php/cover
3•DamonHD•1h ago•0 comments

PostgreSQL production incident caused by transaction ID wraparound

https://www.sqlservercentral.com/articles/i-too-have-a-production-story-a-downtime-caused-by-post...
7•tcp_handshaker•1h ago•2 comments