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.

OpenAI agents attacked RubyGems back in May

https://simonwillison.net/2026/Sep/12/openai-agents-rubygems/
1•lumpa•4m ago•0 comments

How the U.S. Space Force Is Used in Wars Today [video]

https://www.youtube.com/watch?v=RGcRuej-LVE
1•handfuloflight•5m ago•0 comments

Show HN: Menu Hub – a native macOS menu bar manager in SwiftUI/AppKit

https://github.com/Talljack/menu-hub/releases/tag/v0.1.5
1•talljack•9m ago•0 comments

notatallshaw/nab: PubGrub-based dependency resolver for Python packages

https://github.com/notatallshaw/nab
2•Ravencentric•16m ago•1 comments

A method for finding interrelations bethween constants of physics and maths

https://sinscienceandspirituality.blogspot.com/2018/05/the-joys-of-reverse-polish-notation.htm
1•djbarrow•18m ago•0 comments

Pacman AI framework for controlling fusion systems safely makes key decisions

https://www.pppl.gov/news/2026/pacman-ai-framework-controlling-fusion-systems-safely-makes-key-de...
1•o4c•19m ago•0 comments

US lawmakers urge secretive British court to open up about Apple case

https://www.theguardian.com/us-news/2026/sep/11/congress-uk-court-apple-encrypted-data-case
1•CGMthrowaway•20m ago•0 comments

Handshake, not a drug deal? San Francisco police drone case falls apart

https://missionlocal.org/2026/08/sfpd-drone-arrest-charges-dismissed-rtic/
1•aray07•20m ago•0 comments

Why AI chatbots make bad tutors

https://www.heyaristotle.com/blog/why-ai-chatbots-make-bad-tutors
1•rshanreddy•23m ago•0 comments

Nobody Believes It, Everybody Does It

https://blog.jim-nielsen.com/2026/nobody-believes-it-everybody-does-it/
1•aray07•25m ago•0 comments

How good are LLMs at porting software in 2026?

1•estranhosidade•25m ago•0 comments

This is the world's cheapest SOLAR CAR [video]

https://www.youtube.com/watch?v=Hk6aTKV-des
1•thunderbong•27m ago•0 comments

2026 January to May List of LLM Research Papers: Sebastian Raschka

https://magazine.sebastianraschka.com/p/llm-research-papers-2026-part1
1•Alien1Being•30m ago•0 comments

Usenet rewind archive search engine

https://www.usenet-rewind.com/
4•cstadler1869•31m ago•1 comments

Why the AI race has its creators fearing human extinction

https://www.ft.com/content/b7fe0fe0-0463-4f55-9590-0a7d08d8fe66
1•nprateem•31m ago•0 comments

Show HN: NodehistJ – FTN Nodelist Server

https://github.com/oldzoomer-ru/nodehistj
1•oldzoomer•34m ago•2 comments

AI Kills Everybody or Doomer Psyop? (All in Podcast)

https://www.youtube.com/watch?v=cvxjqbfLVk0
1•mudil•37m ago•0 comments

Ask HN: What do you do about API keys?

1•stickynotememo•39m ago•1 comments

Building Specialized Systems We Can Trust with Agents

https://skydiscover-ai.github.io/blog-skysynth.html
1•matt_d•39m ago•0 comments

Clay Mathematics Institute on the Navier-Stokes Problem

https://www.claymath.org/news/navier-stokes-announcement/
2•rvz•41m ago•0 comments

Szmalcownik

https://en.wikipedia.org/wiki/Szmalcownik
1•firefax•45m ago•1 comments

Vulnerability in balcony solar panel inverter (de)

https://www.ccc.de/updates/2026/blinkenlights-hoymiles
3•yitchelle•50m ago•0 comments

Assessing the Evolving Global Competitiveness of the US Auto Industry

https://itif.org/publications/2026/03/23/assessing-evolving-global-competitiveness-of-us-auto-ind...
1•toomuchtodo•52m ago•0 comments

CascadeLUT: Info.-Ordered Streaming Inference for Bandwidth-Constrained FPGAs

https://arxiv.org/abs/2608.00720
1•matt_d•57m ago•0 comments

AI Has Solved One of Math's $1M Millennium Prize Problems

https://www.quantamagazine.org/ai-has-solved-one-of-maths-1-million-millennium-prize-problems-202...
1•jonbaer•57m ago•0 comments

All the Doom Talk Is 'Meant to Distract Us'

https://www.wired.com/story/one-of-ais-fiercest-critics-says-all-the-doom-talk-is-meant-to-distra...
2•cwwc•59m ago•1 comments

How to Detect Residential Proxies

2•jwally•1h ago•0 comments

How to log in where you shouldn't

https://djnn.sh/posts/pam_access/
1•justusw•1h ago•0 comments

Google no longer provides direct URLs in search results

https://www.autom.dev/blog/google-search-goto-links
106•1e1a•1h ago•58 comments

AI Hallucinations Trigger Malware Flag on 1M+ Active User Extension

https://groups.google.com/a/chromium.org/g/chromium-extensions/c/dG_VSqyli1A
4•OzzyOzbour•1h ago•0 comments