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.

Onyx Pro, a local desktop utility for re-evaluating AI IDEs before paying

https://getonyxpro.com
1•chloevalesquez•35s ago•0 comments

Show HN: Globalping – A community powered global network of probes

https://github.com/jsdelivr/globalping
1•jimaek•2m ago•0 comments

Blogging and Writing Style

https://statmodeling.stat.columbia.edu/2026/04/25/blogging-and-writing-style/
1•Tomte•3m ago•0 comments

xAI credits (YC AI STACK) rescinded

1•galaba•5m ago•0 comments

Show HN: Sig – personal & team knowledge base built from your work conversations

https://sig-ai.app
1•smadam9•5m ago•1 comments

GPT 5.5 biosafety bounty

https://openai.com/index/gpt-5-5-bio-bug-bounty/
1•Murfalo•5m ago•0 comments

Ouroboros: Dynamic Weight Generation for Recursive Transformers

https://arxiv.org/abs/2604.02051
1•OsamaJaber•8m ago•0 comments

What Would You Ask an AI to Do in Every Prompt?

1•moonzfxs•8m ago•0 comments

Show HN: Pocket-Ingest – Async Voice Memos to Claude Code via iCloud

https://github.com/tryhardfifi/pocket-ingest
1•filipeisho•11m ago•0 comments

Show HN: Choose Where to Eat

https://apps.apple.com/pt/app/dinner-where-to-eat/id6761313943
1•sambex•11m ago•0 comments

Multimodal Taxonomies

https://mixpeek.com/blog/multimodal-taxonomies
1•Beefin•12m ago•0 comments

Annotate PDF – A zero-server, privacy-first PDF editor

https://annotatepdf.io/
1•prius-lab•13m ago•1 comments

A real-life Kraken stalked the seas of the late Cretaceous

https://www.npr.org/2026/04/24/nx-s1-5793988/giant-octopus-kraken-cretaceous-size
1•bookofjoe•14m ago•0 comments

I Hired a Robot and made him journal

https://www.wysr.xyz/p/i-hired-a-robot-and-made-him-journal
2•martialg•15m ago•0 comments

Title>SBTI Test – Free Online SBTI Personality Test – SBTI

https://sbtitest.work/en
1•shoujikaijishi•17m ago•0 comments

Closed-Loop Extracorporeal Vascular Cleaning by Staged Chemical Dissolution

https://zenodo.org/records/19763808
1•iliatoli•19m ago•0 comments

Officials underestimated impact of AI datacentres on UK carbon emissions

https://www.theguardian.com/technology/2026/apr/24/officials-hugely-underestimated-impact-of-ai-d...
1•Brajeshwar•21m ago•1 comments

Sloppy Copies

https://www.markround.com/blog/2026/04/19/sloppy-copies/
2•birdculture•21m ago•0 comments

Matter Devices Blog – Matterdevices.io

https://matterdevices.io/
1•alator21•25m ago•0 comments

Goldman Sachs leads record renminbi borrowing by US banks

https://www.ft.com/content/e83da9f6-f065-46ad-ad21-e677550b7b0c
1•t-3•28m ago•0 comments

Timothy Leary–1960s Acid Guru–May Have Been Among the CIA's Greatest Assets

https://covertactionmagazine.com/2026/04/24/timothy-leary-1960s-acid-guru-may-have-been-among-the...
1•t-3•28m ago•0 comments

"Game-changer" breast cancer study retracted as researcher out of his post

https://retractionwatch.com/2026/04/15/game-changer-breast-cancer-study-retracted-as-indiana-rese...
1•hentrep•31m ago•0 comments

EverAct – blockchain-verified rewards for walking, cycling, sustainable shopping

https://everact.app/en
1•save-the-planet•31m ago•1 comments

Echon – a Discord alternative I've been building solo

https://echon-voice.com
2•Phrosen•34m ago•0 comments

Lochat: See messages route across the world

https://chat.knowww.net/
1•johanam•34m ago•0 comments

An oral history of the Harvard Lampoon

https://www.washingtonpost.com/style/2026/04/25/harvard-lampoon-150th-conan-snl/
2•raldi•35m ago•0 comments

Reactivity in vanilla JavaScript – Observable Podcast [video]

https://www.youtube.com/watch?v=AUh5aJfafJM
1•recifs•36m ago•1 comments

Social media is no longer social

https://bsky.app/profile/pettertornberg.com/post/3mk64uzhdm22z
7•frereubu•38m ago•1 comments

SciRS2 – Scientific Computing and AI in Rust without C/C++/Fortran dependencies

https://github.com/cool-japan/scirs
2•mikolajw•38m ago•0 comments

Show HN: Chatforge – drag two local LLM conversations together to merge context

https://github.com/gerritsxd/chatforge
1•cyg2•41m ago•0 comments