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

Comments

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

Banned '60 Minutes' Episode Leaked Online: Watch Here

https://www.newsweek.com/banned-60-minutes-episode-leaked-online-watch-here-bari-weiss-cecot-el-s...
1•SilverElfin•1m ago•0 comments

Rockstar Had Ideas for GTA Tokyo, Rio, Moscow, Istanbul

https://www.gameshub.com/news/article/obbe-vermeij-interview-2849146/
1•HelloUsername•1m ago•0 comments

Fortune: How enterprises are moving from AI pilots to production systems

https://fortune.com/2025/12/19/amazon-aws-innovation-lab-aiq/
1•tmuhlestein•2m ago•1 comments

Advent of Slop: A Guest Post by Claude

https://lucumr.pocoo.org/2025/12/23/advent-of-slop/
1•speckx•3m ago•0 comments

The IPv4 address swamp: The new normal

https://blog.apnic.net/2025/12/23/the-ipv4-address-swamp-the-new-normal/
1•speckx•8m ago•0 comments

AI might have accidentally written the source code for our Universe

1•JulianZoria•8m ago•0 comments

2025 was for AI what 2010 was for cloud

https://charity.wtf/2025/12/22/2025-was-for-ai-what-2010-was-for-cloud-xpost/
3•BerislavLopac•12m ago•1 comments

Reference chart for Apple AirPod noises

https://airpodnoises.net
2•nvahalik•13m ago•0 comments

Revolutionizing Wind Energy: A Compact Evolutionary Algorithm for Optimization

https://dl.acm.org/doi/10.1145/3766671.3766786
2•thomasjb•14m ago•0 comments

Show HN: VeriMed – open-source medical license verification

https://github.com/daretechie/verimed
3•dhrey112•14m ago•0 comments

Ej-Es (2010)

https://www.lightspeedmagazine.com/fiction/ej-es/
2•tetris11•16m ago•0 comments

Zizek and Peter Thiel on Pluribus

https://secondvoice.substack.com/p/when-is-helpfulness-harmful
2•Philosopheril•17m ago•0 comments

What If? AI in 2026 and Beyond

https://www.oreilly.com/radar/what-if-ai-in-2026-and-beyond/
3•ArmageddonIt•17m ago•0 comments

Show HN: Openinary – Self-hosted image processing like Cloudinary

https://github.com/openinary/openinary
2•fheysen•18m ago•0 comments

Show HN: PremiumFlow – Track true cost basis for the "Wheel" strategy and LEAPS

https://premiumflow.base44.app/
2•tchantchov•21m ago•0 comments

Near-zero energy computing – Vaire

https://vaire.co/
2•jermaustin1•22m ago•0 comments

Show HN: BBC2Podcast – Geo-unblocking proxy for BBC radio as podcasts

https://github.com/hauxir/bbc2podcast
2•hauxir•23m ago•1 comments

A look at iRobot's 35-year robotics journey

https://www.therobotreport.com/a-look-at-irobot-35-year-robotics-journey/
3•ArmageddonIt•24m ago•0 comments

Ireland plans to make a $1,500 a month basic income for artists permanent

https://www.aol.com/news/ireland-plans-1-500-month-202733101.html
2•toss1•24m ago•1 comments

Recreating the lost SDK for a 42-year-old operating system: VisiCorp Visi On

https://git.sr.ht/~nkali/vision-sdk/tree/main/note/index.md
3•PaulHoule•25m ago•1 comments

Q3 GDP

http://laffer.surge.sh/
2•freespirt•26m ago•0 comments

Show HN: Minimal ChatGPT App Starter Kit (MCP and SSE and Vercel)

https://github.com/shuddha2021/chatgpt-app-starter-kit
2•shuddha7435•27m ago•0 comments

Ask HN: Are they trying to hack me?

2•dgrcode•27m ago•0 comments

Thread Dumps and Project Loom (Virtual Threads)

https://blog.jetbrains.com/idea/2025/12/thread-dumps-and-project-loom-virtual-threads/
2•quapster•28m ago•0 comments

Stop Slopware

https://stopslopware.net/
7•bradley_taunt•28m ago•1 comments

Folder.zone: Share end-to-end encrypted folders live

https://folder.zone
2•todsacerdoti•28m ago•0 comments

Reproducing the NixOS 25.11 Minimal Installation ISO

https://arnout.engelen.eu/blog/reproducing-nixos-25.11-minimal-iso/
2•todsacerdoti•30m ago•0 comments

What a Solar Superstorm could mean for the US

https://www.usgs.gov/news/featured-story/what-a-solar-superstorm-could-mean-us
3•keepamovin•31m ago•0 comments

Bottom-Up Parser Example

https://www.errorcodezero.dev/blog/bottom-up-parser-example/
2•errorcodezero•34m ago•1 comments

Unix "find" expressions compiled to bytecode

https://nullprogram.com/blog/2025/12/23/
3•zdw•37m ago•1 comments