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.

Ask HN: How do you cope with AI being used to target and bomb children?

1•trumbitta2•42s ago•0 comments

Claude Opus 5.5, GPT-6 Sol, GPT-6 Luna, and a new price war

https://simonwillison.net/2026/Sep/22/opus-and-sol-and-luna/
1•theanonymousone•2m ago•0 comments

Show HN: Semantic Search for Zotero Local

https://github.com/ilDon/zotero-semantic-search
1•ildon•3m ago•0 comments

Show HN: Listen to your eBook and control the playback sentence by sentence

https://documentplayer.com/
1•janpmz•3m ago•0 comments

GPT-6 Sol and Luna push the cost efficiency frontier by halving token cost

https://artificialanalysis.ai/articles/gpt-6-sol-and-luna-push-the-cost-efficiency-frontier
1•theanonymousone•5m ago•0 comments

Observe – local semantic code search that admits when grep beats it

https://github.com/tritsystem/012-trit-search
1•gbranaa4•12m ago•0 comments

NobodyWho is an inference engine that lets you run LLMs locally and efficiently

https://github.com/nobodywho-ooo/nobodywho
1•Bluestein•15m ago•0 comments

Show HN: I built a site for my 42 km walk across 30 Tokyo stations

https://yamathon.tonymanh.space
1•tonymanh•16m ago•0 comments

Taming the ML Firehose: Scaling Feature Consistency

https://www.uber.com/us/en/blog/taming-ml-firehose/
1•iamsyr•16m ago•0 comments

Tearing Down a Spring Drive

https://www.thenakedwatchmaker.com/decon-seiko-snowflake
1•stefanv•18m ago•0 comments

New AI technique could make minimally invasive surgeries safer and more precise

https://news.mit.edu/2026/new-ai-technique-could-make-minimally-invasive-surgeries-safer-more-pre...
2•ycombinatronics•21m ago•1 comments

Rebranding artificial intelligence as super intelligence

https://www.bbc.com/news/videos/c8n5d9x10v14o
2•tin7in•21m ago•1 comments

Jev in 25 Lines of Python

https://www.nobodywho.ai/posts/jev-in-25-lines/
2•bashbjorn•22m ago•0 comments

Nvitop: A better top for Nvidia GPUs

https://github.com/XuehaiPan/nvitop
1•Nina_antalpha•24m ago•1 comments

Aesthetic Terminal ePub Reader

https://github.com/UsboKirishima/rr
1•333revenge•27m ago•0 comments

Gemini Hacked Three Companies in First Known Breakout by Google's AI

https://simonwillison.net/2026/Sep/18/gemini-hacked-three-companies/
2•coffee•28m ago•0 comments

Linux Command Line Tricks that you do not know yet

https://lovethepenguin.com/
1•torgeros•37m ago•0 comments

Show HN: Newdo – a todo list where the list is an output, not an input

https://newdo.beaverminds.com
1•shaanjus4u•38m ago•0 comments

Grit your teeth and ship it

https://www.seangoedecke.com/grit-your-teeth-and-ship-it/
1•coffee•39m ago•0 comments

Discourse (open source forums) adds Discord-style voice and video calls

https://meta.discourse.org/t/voice-discord-style-voice-and-video-rooms-now-bundled-with-discourse...
1•Scaled•39m ago•0 comments

Recursive self-improvement of AI research agents

https://arxiv.org/abs/2609.26457
1•sbulaev•41m ago•0 comments

Show HN: Analysis of Games from Chess Olympiad with Opus 5.5 and Stockfish

https://olympiad2026.unremarkable.info/
1•myle•46m ago•0 comments

Microsoft disrupts AI-assisted platform that compromised 12,000 accounts

https://arstechnica.com/security/2026/09/microsoft-disrupts-ai-assisted-platform-that-compromised...
6•joozio•47m ago•0 comments

Why Tool AIs Want to Be Agent AIs

https://gwern.net/tool-ai
1•duck•52m ago•0 comments

Fearless SIMD v1.0 is here

https://linebender.org/blog/fearless-simd-1-0/
1•AndrewDucker•52m ago•0 comments

M6 Mac Mini uses soldered NAND storage again

https://www.macrumors.com/2026/09/22/new-mac-mini-ssd-cant-be-removed/
2•gloxkiqcza•53m ago•0 comments

Show HN: Yass – Yet Another Spec Syntax Enters Beta

https://github.com/shakefu/yass
1•bilbo-b-baggins•53m ago•1 comments

Building a docs site that screenshots itself

https://semaloop.com/blog/docs-that-screenshot-themselves
1•samstarling•57m ago•1 comments

There is no epidemic of loneliness, but there is an epidemic of scurvy

https://www.experimental-history.com/p/there-is-no-epidemic-of-loneliness
1•luu•1h ago•0 comments

Claude Code Hooks Explained: The Deterministic Layer Around Your Agent

https://blakecrosley.com/blog/claude-code-hooks-explained
1•northbridgedev•1h ago•0 comments