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.

SAGG – failover gateway for cheap LLM providers

https://api.privatedeskai.com/benchmarks
1•koroleva_labs•2m ago•0 comments

Genome Duplication Is an Evolutionary Gamble

https://www.quantamagazine.org/genome-duplication-is-a-radical-evolutionary-gamble-20260902/
1•gumby•3m ago•0 comments

Show HN: OpenMuse – an Open Source alternative to Meta's personal agent

https://github.com/diggerhq/openmuse/
1•iacguy•4m ago•0 comments

Anthropic Staffers Again Sound the Alarm on AI Catastrophe

https://www.motherjones.com/politics/2026/09/anthropic-ai-risks-coxon-amodei-openai-cybersecurity...
1•signa11•7m ago•0 comments

OpenAI's Bubeck denies trying to cut Anthropic mathematician from credit

https://thenextweb.com/news/bubeck-navier-stokes-account-apology-altman
1•htk•8m ago•0 comments

T-Mobile to Charge $5 a Month for iOS 27 iPhone Handoff

https://www.macrumors.com/2026/09/10/ios-27-iphone-handoff-cost/
2•seemaze•8m ago•0 comments

Review a pull request by booting it

https://fzakaria.com/2026/09/09/review-a-pull-request-by-booting-it
1•lalitmaganti•9m ago•0 comments

Let's Encrypt Outage

https://letsencrypt.status.io/pages/incident/55957a99e800baa4470002da/6aa35c1d892d7304f2747e01
1•takoid•10m ago•0 comments

Watermarks Without Verification: AI Text Watermarking After the EU AI Act

https://arxiv.org/abs/2609.09604
1•sbulaev•11m ago•0 comments

'Not selling my soul': Why this Aussie maths professor took on OpenAI

https://www.afr.com/world/north-america/not-selling-my-soul-why-this-aussie-maths-professor-took-...
1•Alien1Being•14m ago•0 comments

Tesla Autopilot was on in I-35 crash that killed its driver

https://electrek.co/2026/09/10/tesla-driver-assist-i35-guardrail-pattonsburg/
1•jijojv•15m ago•1 comments

Show HN: Kern Agent – See inside your agent's brain

https://github.com/oguzbilgic/kern-ai
1•obilgic•21m ago•0 comments

Try GPT-6 Astra for a few bucks

https://trylatestmodel.com/
2•Guustaaf•26m ago•1 comments

Hired to Code, He Built Hudson River Trading and a $27B Fortune

https://www.bloomberg.com/news/features/2026-09-10/how-jason-carroll-built-hudson-river-trading-a...
4•aanet•42m ago•1 comments

Vivaldi 8.2 for mobile: the browser. Your rules. Your extensions

https://vivaldi.com/blog/vivaldi-on-mobile-8-2/
4•thunderbong•42m ago•0 comments

A mini-game around fake news

https://unspin.hidden-pond-5e6a.workers.dev/
3•azermite•44m ago•0 comments

How My Students Think About AI

https://www.lesswrong.com/posts/ySXuvJcqRindQwAk7/how-my-students-think-about-ai
9•paulpauper•44m ago•1 comments

In Japan, Television Viewing Doesn't Have to Take a Back Seat (2013)

https://www.wsj.com/articles/SB10001424127887323296504578397020440247856
3•libpcap•46m ago•0 comments

How do Necco wafers, paper receipts, and farmers almanacs still exist?

https://thehustle.co/newsletters/09-09-2026
3•paulpauper•46m ago•0 comments

AI #185: Preference Cascade

https://thezvi.substack.com/p/ai-185-preference-cascade
2•paulpauper•46m ago•0 comments

Allow Carriers on Planes

https://www.jefftk.com/p/allow-carriers-on-planes
4•luu•52m ago•0 comments

Sky sphere representation in language models (29 Jul 2026)

https://arxiv.org/abs/2607.27092
2•throwaway81523•55m ago•0 comments

Show HN: Benzi – A Code Intillegence/Harness Beating Claude Code and CodeGraph

https://benzi.fly.dev/benchmark
7•tweedler290•55m ago•2 comments

A fossil feather in dinosaur poop may explain why birds survived mass extinction

https://phys.org/news/2026-09-fossil-feather-dinosaur-poop-birds.html
3•wglb•57m ago•1 comments

Continuous video of black hole radio observations challenges shock wave theory

https://phys.org/news/2026-09-video-black-hole-radio-theory.html
1•wglb•1h ago•1 comments

Zero heap allocation chess engine in OxCaml

https://github.com/ericlovesmath/oxcaml-chess
2•0xsn3k•1h ago•0 comments

Developer created an app to detect nearby Meta glasses

https://www.businessinsider.com/zuckoff-app-detects-meta-ai-smart-glasses-recording-privacy-2026-9
4•CarbonCycles•1h ago•2 comments

A galaxy with almost no stars? New Cloud-9 observations strengthen the case

https://phys.org/news/2026-09-galaxy-stars-cloud-case.html
1•wglb•1h ago•0 comments

I built a simulator for the iPhone Duo

https://progressier.com/iphone-duo-simulator
2•kbst•1h ago•2 comments

PanoDrop

https://www.panodrop.app/
3•dueffects•1h ago•0 comments