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.

Apple's Aperture site is still online in 2026

https://www.apple.com/welcomescreen/aperture3/
1•giladvdn•24s ago•0 comments

Testing at the Boundaries (2019)

https://www.tedinski.com/2019/03/19/testing-at-the-boundaries.html
1•tie-in•1m ago•0 comments

Five months after switching Fluxzy from Electron to Tauri

https://www.fluxzy.io/resources/blogs/electron-to-tauri-migration-fluxzy-desktop
1•birdculture•3m ago•0 comments

Commission simplifies Europe-wide travel booking and train travel

https://ec.europa.eu/commission/presscorner/home/en
1•_____k•6m ago•0 comments

bfloat16

https://en.wikipedia.org/wiki/Bfloat16_floating-point_format
1•tosh•6m ago•0 comments

Show HN: I built an open source dication tool based on benchmarks

https://codictate.app
1•emillykkeg•9m ago•0 comments

Meta Incognito Mode: A Private Way to Chat with AI

https://about.fb.com/news/2026/05/incognito-chat-whatsapp-meta-ai/
1•7777777phil•11m ago•0 comments

A new wave of software efficiency is coming

https://simianwords.bearblog.dev/a-new-wave-of-software-efficiency-is-coming/
1•simianwords•14m ago•0 comments

Hetzner us-east, now you can get only the smallest instance (CPX11)

https://status.hetzner.com/incident/0a75c7ae-3377-41dc-aabe-601063724d24
1•gkresic•22m ago•1 comments

Self-contained Linux applications with lone Lisp

https://www.matheusmoreira.com/articles/self-contained-lone-lisp-applications
2•fanf2•23m ago•0 comments

AionDB: PostgreSQL-compatible SQL, graph, and vector database in Rust

https://aiondb.xyz/
2•ayoubnabil•25m ago•0 comments

PSVL 1.0 – The most comprehensive source-visible license (276 clauses)

https://github.com/BMBOMICH/PSVL
1•BMBOMICH•30m ago•0 comments

AutoScientist: Automating the Science of Model Training

https://www.adaptionlabs.ai/blog/autoscientist
1•sethbannon•32m ago•0 comments

Economic Futures – Anthropic

https://www.anthropic.com/economic-futures
2•gurjeet•32m ago•2 comments

2D map of 26,741M/CV papers from CVPR, NeurIPS, ICML, ICLR (2024–2025)

https://matejgazda.com/posts/paper-map.html
1•matog•34m ago•1 comments

Waiting for Website Changes in the Browser

https://alexwlchan.net/2026/livereload-in-browser/
1•ingve•36m ago•0 comments

Claude subscriptions no longer include Agent SDK and Claude -p usage

https://www.xda-developers.com/anthropics-claude-subscriptions-no-longer-include-agent-sdk-and-cl...
3•gitaarik•41m ago•0 comments

Silicon Valley Is Bracing for a Permanent Underclass

https://www.nytimes.com/2026/04/30/opinion/ai-labor-work-force-silicon-valley.html
2•imartin2k•41m ago•0 comments

Best TTS in 2026: Blind Benchmark

https://techstackups.com/articles/best-tts-2026-blind-benchmark/
3•ritzaco•41m ago•0 comments

Bun's rewrite in Rust was merged

https://github.com/oven-sh/bun/commit/23427dbc12fdcff30c23a96a3d6a66d62fdc091d
9•maxloh•47m ago•4 comments

Show HN: I built an AI travel camera because I was tired of Google Lens

https://apps.apple.com/us/app/spotter-the-travel-companion/id6761238251
1•XanMan•48m ago•0 comments

Show HN: AGEF, an open evidence format for AI agent sessions

https://github.com/radotsvetkov/agef
1•radotsvetkov•48m ago•0 comments

Solar Impulse 2 Crashes into Gulf

https://dronexl.co/2026/05/13/solar-impulse-2-crashes-gulf/
1•pingou•49m ago•0 comments

PHP RFC: Bound-Erased Generic Types

https://wiki.php.net/rfc/bound_erased_generic_types
2•choult•49m ago•0 comments

Rewrite Bun in Rust has been merged

https://github.com/oven-sh/bun/pull/30412
6•Chaoses•50m ago•3 comments

An Experimental PS1 emulator written in Zig

https://github.com/maxpoletaev/nupsx
2•Einenlum•54m ago•0 comments

People Would Rather Have Nuclear Power Plants in Their Area Than AI Data Centers

https://www.forbes.com/sites/maryroeloffs/2026/05/13/people-would-rather-have-nuclear-power-plant...
3•robtherobber•56m ago•3 comments

The gen on the family of 'vi' clones

https://jdebp.uk/FGA/vi-family.html
1•JdeBP•56m ago•1 comments

49,000 Lake Tahoe residents will lose power to data centers

https://www.shacknews.com/article/149126/lake-tahoe-residents-lose-power-data-centers
2•vrganj•58m ago•0 comments

RFV-0001: Request for Vibes

https://github.com/Request-For-Vibes/rfv
1•tomaytotomato•59m ago•0 comments