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.

ESP-SDR Firmware Turns ESP32 into a 2.4/5 GHz Software-Defined Radio (SDR)

https://www.cnx-software.com/2026/10/04/esp-sdr-firmware-turns-esp32-into-a-2-4-5-ghz-software-de...
1•0in•1m ago•0 comments

Olomni for All Devs

https://www.olomni.com/
1•FaustoDario33•1m ago•0 comments

2026 SaaS Metrics Industry Statistics

https://nicheaitool.com/saas-metrics-industry-statistics
1•acewits•2m ago•0 comments

Ask HN: Where can a solo dev still find a moat in LLM inference?

1•SouravInsights•2m ago•0 comments

The Qwen Saga Continues

https://gabucino.hu/index.htm#2026-09-08-11:37:26
1•spikewall•5m ago•0 comments

Plane Crazy: Building a Plane in 30 Days [video]

https://www.youtube.com/watch?v=FSNzF-KSGiw
1•tosh•5m ago•0 comments

Chinese homegrown poultry variety breaks decades-long monopoly

https://www.globaltimes.cn/page/202307/1294882.shtml
1•Michelangelo11•11m ago•0 comments

Stroboscopic Effect

https://en.wikipedia.org/wiki/Stroboscopic_effect
1•sans_souse•14m ago•0 comments

Did the universe have a beginning? (2012)

https://arxiv.org/abs/1204.4658
1•lioeters•15m ago•0 comments

Wiki loves monuments 2026 in the USA

https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Monuments_2026_in_the_United_States
1•sans_souse•15m ago•0 comments

Launching: Nautilus – Run a coding agent from your phone, merge on your PC

https://github.com/itamarhanan/nautilus
1•itamarh•19m ago•0 comments

How to Live on Earth? [video]

https://www.youtube.com/watch?v=h3mRsvFmWi0
1•diwash007•22m ago•1 comments

Zadar Cow from Hell

https://en.wikipedia.org/wiki/Zadar!_Cow_from_Hell
1•Bluestein•22m ago•0 comments

Ultimate Physical Limits of Computation (2000)

https://arxiv.org/abs/quant-ph/9908043
1•lioeters•24m ago•0 comments

Benchmarking CV and depth-estimation algorithms

https://mozilladatacollective.com/datasets/cmuppz5bm01s5mg067qo2b8x3
1•createphotos•28m ago•0 comments

Repetitive Task Agent Automateion

1•anthony74•30m ago•0 comments

Outshining Your Rival: Interpersonal Rivalry and Its Effects

https://pubsonline.informs.org/doi/epdf/10.1287/orsc.2024.18649
1•Tomte•31m ago•0 comments

Emitting metadata early makes building/checking Rust up to twice as fast

https://github.com/PowderworksCode/headstart
1•knuckleheads•32m ago•0 comments

Ammonium perchlorate composite propellant

https://rocketry.fandom.com/wiki/Ammonium_perchlorate_composite_propellant
1•Bluestein•34m ago•0 comments

Embedded Evaluators Can't Fix Companies That Choose to Be Bad

https://stellabiderman.ai/blog/embedded-evaluators-cant-fix-companies-that-choose-to-be-bad/
1•erlend_sh•35m ago•0 comments

Qwen3.8-Flash-Next 177B running at 11–15 tok/s on 1 RTX 5070 12GB and 32GB RAM

https://github.com/MohammadHaishemKhawaja/hashyy
1•maziianobeatz58•37m ago•0 comments

Accountability mechanisms can be joyful

https://liquidbrain.net/blog/accountability-and-joy/
1•luu•44m ago•0 comments

UK Government Body Kept Files on People Criticizing Prevent Program

https://reclaimthenet.org/uk-prevent-unit-tracked-online-critics
2•latein•48m ago•0 comments

An LLM Beat NetHack

https://kenforthewin.github.io/blog/posts/llm-nethack-ascension/
1•bigmadshoe•48m ago•0 comments

Taco Moses Fold

https://twitter.com/rystrave/status/2106446623736004682
1•sergiotapia•49m ago•0 comments

Physicists identify 'octupolar' magnetism, with implications for quantum tech

https://phys.org/news/2026-09-physicists-octupolar-magnetism-implications-quantum.html
1•smurda•50m ago•0 comments

Let AI agents use your site with 3 HTML attributes

https://markodenic.tech/let-ai-agents-use-your-site-with-3-html-attributes/
1•nreece•52m ago•0 comments

Someone got Doom running in an SQL database

https://arstechnica.com/gaming/2026/10/can-it-run-doom-sql-database-edition/
1•sbulaev•52m ago•0 comments

Show HN: Random Word Generator

https://arandomword.com/
1•artiomartiom•54m ago•0 comments

Nvidia Introduces 64GB DGX Spark

https://www.tomshardware.com/pc-components/gpus/nvidia-introduces-64gb-dgx-spark-to-throw-local-a...
1•kristianp•57m ago•0 comments