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.

Cryptography Challenges KalmarCTF 2026

https://blog.zksecurity.xyz/posts/kalmar2026/
1•ahpuh•1m ago•0 comments

Curryvim, the new Neovim distro, that does not try to be VSCode

https://github.com/SyntaxError2505/curryvim
1•SyntaxError2505•12m ago•0 comments

Our response to the April 2026 incident

https://lovable.dev/blog/our-response-to-the-april-2026-incident
1•filleokus•22m ago•0 comments

Barbara Liskov: Data Abstraction, Dijkstra, Distributed Systems

https://www.developing.dev/p/turing-award-winner-data-abstraction
1•signa11•24m ago•0 comments

Show HN: Netflix for Internet Pirates

https://plank.lsreeder.com/
1•lsreeder01•24m ago•1 comments

Building an In-House Lovable

https://engineering.merciyanis.com/blog/going-ai-native-how-we-handed-our-backlog-to-agents
1•axi0m•26m ago•0 comments

Pompeii archaeologists use AI to reconstruct man killed in volcano's eruption

https://www.npr.org/2026/04/28/g-s1-118986/pompeii-archaeologists-use-ai-to-reconstruct-man-kille...
1•razorbeamz•34m ago•0 comments

Show HN: Nat-zero – Scale-to-zero NAT instances for AWS (Terraform module)

https://machine.dev/blog/nat-zero-scale-to-zero-nat-instances/
1•leonardosul•37m ago•1 comments

Porting a Scratch-Built 500M LLM Training Pipeline to ROCm on Strix Halo

https://github.com/epscylonb/1386.ai.rocm
1•thomasfromcdnjs•40m ago•0 comments

Wire: Secure Messenger from Berlin

https://wire.com/en/
2•cl3misch•41m ago•0 comments

Show HN: A narrative walk through AI history, paper by paper (1936–2025)

https://github.com/hgus107/A-Long-Walk-of-AI
1•hgus107•42m ago•0 comments

Vibe Coding Will Break Your Company

https://www.forbes.com/sites/jasonwingard/2026/04/23/vibe-coding-will-break-your-company/
31•sminchev•44m ago•11 comments

Requests for Startups

https://www.ycombinator.com/rfs
2•taubek•52m ago•0 comments

Xiaomi open-sources MiMo-V2.5: 311B A15B 1M-context omnimodal model

https://huggingface.co/XiaomiMiMo/MiMo-V2.5
2•gainsurier•54m ago•0 comments

For the average price of a car in the US, you could buy 4 new Chinese EVs

https://english.kyodonews.net/articles/-/75029
9•anigbrowl•56m ago•0 comments

Show HN: Discuss CLI – No more reviewing agent plans in the terminal

https://github.com/codesoda/discuss-cli/
1•codesoda•1h ago•1 comments

What Claude Shannon Knew in 1950 That We're Pretending Is New

https://www.thecontentwrangler.com/p/what-claude-shannon-knew-in-1950
5•eigenBasis•1h ago•0 comments

Billionaire tax proposal in California on track to qualify for ballot

https://www.boston25news.com/news/national/billionaire-tax/CB6SLQIFI42VDPRJQ37OBMS4TY/
4•1vuio0pswjnm7•1h ago•1 comments

Nvidia's Reaches New Record at Nearly $5.3T Value

https://www.forbes.com/sites/antoniopequenoiv/2026/04/27/nvidia-sets-new-record-with-nearly-53-tr...
1•mgh2•1h ago•0 comments

Ideavalu – AI generates startup ideas based on your esperience

https://www.ideavalu.com
1•Sottasan•1h ago•1 comments

Nocord HF – A discord style FT8 client written in Golang

https://github.com/kyleomalley/nocordhf
1•kyleomalley•1h ago•2 comments

A new Moore's Law for AI agents

https://theaidigest.org/time-horizons
1•Cub3•1h ago•0 comments

The Technological Republic, in brief

https://twitter.com/PalantirTech/status/2045574398573453312
1•layer8•1h ago•0 comments

Gardens, Not Roads: Cultivating Open Source Communities

https://tarakiyee.com/gardens-not-roads-cultivating-open-source-communities/
3•g0xA52A2A•1h ago•0 comments

Peerloop – Review three products, get three reviews on yours

https://peerloop.xyz/
2•sssecasiu•1h ago•0 comments

HNSW vector search beyond available RAM for ESP32P4

https://github.com/brunokeymolen/nn20db-sdk
2•brunokeymolen•1h ago•1 comments

Great Paper: The Calculated Typer – Iowa Type Theory Commute Podcast S7 E6

https://pocketcasts.com/podcast/iowa-type-theory-commute/4c437000-eef8-0137-b700-0acc26574db2/gre...
2•matt_d•1h ago•0 comments

Show HN: Vaava – a baby routine tracker / logging app

https://www.vaava.app/
2•jkantola•1h ago•1 comments

WASM is not quite a stack machine

https://purplesyringa.moe/blog/wasm-is-not-quite-a-stack-machine/
2•signa11•1h ago•0 comments

TiddlyWiki v5.4.0

https://tiddlywiki.com/
7•Tomte•1h ago•1 comments