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.

Most people across 36 countries have negative views of Israel

https://www.pewresearch.org/short-reads/2026/06/04/most-people-across-36-countries-have-negative-...
1•goldfishgold•3m ago•0 comments

Are Memories Transferable – Or Edible?

https://www.quantamagazine.org/are-memories-transferable-or-edible-20260605/
1•anujbans•3m ago•0 comments

Show HN: Get v2.0

https://github.com/Water-Run/get/releases/tag/v2.0
1•linzhangrun•5m ago•0 comments

The Russian who invented semiconductors 25 years before the USA

https://www.semidoped.com/p/til-the-man-who-invented-the-future
2•johncole•10m ago•0 comments

2ez.sol Its 1999 again Free games. 2ez

https://2ez.sol.site
1•sgspace•17m ago•1 comments

Grid: E2EE Alternative to Life360

https://mygrid.app
1•thebiblelover7•23m ago•1 comments

Field of clones: How horse replicas came to dominate polo

https://knowablemagazine.org/content/article/technology/2026/cloned-polo-horses
4•gscott•24m ago•0 comments

Lego launches 12,060-piece Sagrada Família – its biggest ever set

https://www.cnn.com/2026/06/05/style/lego-sagrada-familia-gaudi-scli-intl
1•giuliomagnifico•26m ago•0 comments

Show HN: LLM for Dummies

https://ronreiter.github.io/llm-for-dummies/
1•ronreiter•28m ago•0 comments

Show HN: TakoVM – Isolated model and tool execution used by enterprises

https://github.com/las7/TakoVM
1•sakuraiben•28m ago•0 comments

The gamers taking on the industry to stop it switching off games

https://www.bbc.com/news/articles/c8e8e7g0r82o
1•breve•29m ago•0 comments

Ukrainian drones target St Petersburg in attack Russia calls 'unprecedented'

https://www.bbc.com/news/articles/cg7498kz808o
3•MilnerRoute•29m ago•1 comments

Show HN: Ext-Infer – Native LLM Inference and Embeddings for PHP

https://infer.displace.tech
1•eamann•31m ago•0 comments

Agent in 50 Lines

https://minimal-agent.com/
3•andai•35m ago•1 comments

The oldest surviving animated feature film at 100

https://www.bbc.com/culture/article/20260603-how-a-26-year-old-german-woman-made-the-worlds-oldes...
2•1659447091•35m ago•1 comments

New Biochemistry-Based Metabolic Protocol Seeking Alpha Concierge Members

1•joshwprinceton•37m ago•0 comments

NASA interested in Hubble reboost if costs can be reduced

https://spacenews.com/nasa-interested-in-hubble-reboost-if-costs-can-be-reduced/
2•defrost•53m ago•0 comments

How Liminalism Became the Defining Aesthetic of Our Time

https://hyperallergic.com/how-liminalism-became-the-defining-aesthetic-of-our-time/
4•zeech•58m ago•0 comments

Show HN: Oproxy – inspect and modify network traffic from the browser

https://github.com/sauravrao637/oproxy
3•sauravrao637•59m ago•1 comments

The Demon of the Gaps

https://surfingcomplexity.blog/2026/06/06/the-demon-of-the-gaps/
6•azhenley•1h ago•2 comments

Gnome OS Nightly

https://os.gnome.org
3•shaunpud•1h ago•0 comments

TSMC CEO: I envy their 80% gross margins, but I would never do that

https://www.thestreet.com/investing/stocks/tsmc-taiwan-semiconductor-ceo-sends-blunt-message-to-m...
3•teleforce•1h ago•0 comments

ForgeLite-The Most Minimalized Git

2•david3289•1h ago•0 comments

I made this word find game

https://word.1200tech.com
4•bosco_camera•1h ago•0 comments

Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering

https://arxiv.org/abs/2601.14470
22•Anon84•1h ago•2 comments

Gaia2: Benchmarking LLM Agents on Dynamic and Asynchronous Environments

https://arxiv.org/abs/2602.11964
2•Anon84•1h ago•0 comments

Bitcoin is cratering, but there is a new Wall Street crypto HYPE

https://www.cnbc.com/2026/06/06/bitcoin-price-crash-crypto-hype-hyperliquid-etfs.html
4•KnuthIsGod•1h ago•0 comments

HateArena – A free and open source arena shooter

https://github.com/hatearena/hate
5•death_eternal•1h ago•0 comments

Ask HN: Where do you get the latest updates about AI?

3•d0able•1h ago•1 comments

An Ohio Valley 100k-Watt FM Signal Is Severed in Broad Daylight – Radio World

https://www.radioworld.com/news-and-business/headlines/an-ohio-valley-100000-watt-fm-signal-is-se...
55•pkaeding•1h ago•45 comments