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.

Why Elixir Is the Best Language for LLMs (and What the Benchmarks Show)

https://codemyspec.com/blog/why-elixir-is-the-best-language-for-llms
1•ksec•1m ago•0 comments

Designing a 4D Digital Archive for Ikebana

https://ishiguro-lab.org/projects/designing-a-4d-digital-archive-for-ikebana/
1•ohjeez•2m ago•0 comments

Lark: a parsing toolkit for Python

https://github.com/lark-parser/lark
1•saikatsg•2m ago•0 comments

Git email patch review addon for Thunderbird

https://mccd.space/git/thunderbird-patch-review/file/README.html.html
1•elashri•4m ago•0 comments

Dictionaries and Tables

https://www.defconq.tech/docs/concepts/dictionariesTables
1•mpweiher•10m ago•0 comments

Thermal Design for Spaceflight (NASA, 2022) [pdf]

https://ntrs.nasa.gov/api/citations/20230003714/downloads/Thermal%20Design%20for%20Spaceflight.pp...
2•jason_s•12m ago•0 comments

Em dashes are fucking amazing

https://psychotechnology.substack.com/p/em-dashes-are-fucking-amazing
4•lr0•12m ago•0 comments

Textmode Overlay – live ASCII rendering for browser video and canvas

https://extension.textmode.art/
1•eclypz•19m ago•0 comments

Female Promotions and the Academic Pipeline: Evidence from a Natural Experiment

https://cepr.org/publications/dp21325
1•paulpauper•22m ago•0 comments

Socialists should embrace luxury apartments

https://www.ft.com/content/d15171ec-6665-40c6-99df-6962bcf4c761
1•paulpauper•22m ago•1 comments

Huginn: An AI Agent Activity Console

https://github.com/tohuw/huginn
1•tohuw•22m ago•2 comments

AgentSpec: Testing framework for AI agents (Jest for non-deterministic behavior)

https://github.com/Ozperium/agentspec
1•pawfromoz•23m ago•0 comments

Generative AI Can Harm Teaching

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7007339
1•rekabis•24m ago•1 comments

Xi Jinping Delivers Keynote Speech at World AI Conference 2026 in Shanghai [video]

https://www.youtube.com/watch?v=0Pbv5_7t1GQ
5•verdverm•26m ago•0 comments

A Note from Bethesda Game Studios

https://bethesda.net/en/article/7wrffyXajE4BmCLJVpOkcN/a-note-from-bethesda-game-studios
2•agluszak•29m ago•0 comments

Crosswords but using a graph instead of a grid

https://constellate.day/
1•imtoosly•30m ago•0 comments

FFmpeg gets 1.372x faster RGB24-to-RGBA conversion with AVX-512

https://www.phoronix.com/news/FFmpeg-AVX-512-1.372x
1•logickkk1•30m ago•0 comments

Self-Hosted Dynamic DNS

https://akr.am/blog/posts/self-hosted-dynamic-dns
3•Brajeshwar•34m ago•0 comments

Less Is More: Why Audio on SoundCloud Looks Different

https://developers.soundcloud.com/blog/less-is-more-why-soundcloud-low-passes-its-aac-transcodings/
6•1317•34m ago•1 comments

(Ab)Using Overload Sets to Create Ad-Hoc Template APIs in D

https://blog.dlang.org/2026/07/19/abusing-overload-sets-to-create-ad-hoc-template-apis/
2•WalterBright•35m ago•1 comments

A Tribute to Lorenzo Kristov: Designing the Grid from the Community Up

https://energyempirepodcast.substack.com/p/a-tribute-to-lorenzo-kristov-designing
1•mooreds•36m ago•0 comments

I have built a full-page screenshot tool with a built-in editor

https://chromewebstore.google.com/detail/scrollshot-pro-–-full-pag/lpelhlcjkdegabhilgaapjbneolg...
1•zzivic•37m ago•0 comments

Hackers abuse ViPNet software to target Russian govt agencies

https://www.bleepingcomputer.com/news/security/hackers-abuse-vipnet-software-to-target-russian-go...
1•sbulaev•37m ago•0 comments

Who Uses DIDComm?

https://blog.identity.foundation/who-uses-didcomm/
1•mooreds•37m ago•0 comments

AI Requires a Labor Market Bailout

https://www.thecareertoolkitbook.com/blog/ai-requires-a-labor-market-bailout
2•mooreds•37m ago•0 comments

Signal to Noise: The challenge of AI-authored text

https://calmdown13.substack.com/p/signal-to-noise
1•calmdown13•37m ago•0 comments

Nanocodex: Headless Rust Agents SDK

https://github.com/gakonst/nanocodex
1•handfuloflight•42m ago•0 comments

FIAF Disaster Handbook: Preparedness & Recovery for Audio-Visual Archives

https://www.fiafnet.org/pages/Publications/fiaf-disaster-handbook.html
1•mmooss•46m ago•2 comments

O2Ring Analyzer – CLI for overnight pulse-oximetry CSV exports

https://github.com/nighttimecf/o2ring-analyzer
1•warenstein•48m ago•0 comments

Z80 turns 50 as an open-source drop-in replacement nears DIP40 silicon

https://www.tomshardware.com/tech-industry/zilog-z80-turns-50-as-open-source-replacement-heads-fo...
1•logickkk1•51m ago•0 comments