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•7mo ago

Comments

zoezoezoezoe•7mo 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•7mo 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.

Free Software Awards Winners Announced: Andy Wingo, Alx Sa, Govdirectory

https://www.fsf.org/news/2024-free-software-awards-winners
2•pseudolus•4m ago•0 comments

NeuralOperator Joins the PyTorch Ecosystem

https://pytorch.org/blog/neuraloperatorjoins-the-pytorch-ecosystem/
1•williamjsdavis•8m ago•0 comments

States lodge lawsuit against Trump's $100k H-1B visa fee

https://www.politico.com/news/2025/12/12/trump-visa-fee-lawsuit-00689510
3•sul_tasto•9m ago•0 comments

Evaluating Gemini Robotics Policies in a Veo World Simulator

https://veo-robotics.github.io/
1•thomasm6m6•11m ago•0 comments

Quantum Computing Could Put IBM Back on Top Again

https://www.barrons.com/articles/ibm-stock-quantum-computing-system-two-a6c615de
1•Bostonian•14m ago•1 comments

Awesome-Jj: Jujutsu Things

https://github.com/Necior/awesome-jj
1•n3t•14m ago•0 comments

Emulating AVX-512 intrinsics in Miri

https://trifectatech.org/blog/emulating-avx-512-intrinsics-in-miri/
1•ashvardanian•16m ago•0 comments

Unswitching Loops for Fun and Profit

https://xania.org/202512/12-loop-unswitching
1•ibobev•23m ago•0 comments

Job isn't programming

https://codeandcake.dev/2025/12/12/your-job-isnt-programming/
2•nick4•25m ago•0 comments

Making Windows Terminal with GitHub Copilot CLI

https://developer.microsoft.com/blog/making-windows-terminal-awesome-with-github-copilot-cli
2•ibobev•25m ago•0 comments

Resolving an ambiguity in the Windows clipboard automated text conversion table

https://devblogs.microsoft.com/oldnewthing/20251212-05/?p=111862
1•ibobev•26m ago•0 comments

Coffee Pod Financing

https://newsletterhunt.com/emails/205961
1•mooreds•27m ago•0 comments

OpenAI Ends 'Vesting Cliff' for New Employees in Compensation-Policy Change

https://www.wsj.com/tech/ai/openai-ends-vesting-cliff-for-new-employees-in-compensation-policy-ch...
1•garbawarb•28m ago•0 comments

New Rule Forbids Gnome Shell Extensions Made Using AI Generated Code

https://www.phoronix.com/news/GNOME-Extensions-Block-AI
1•turrini•30m ago•0 comments

A unscientific guide to the security of various PQC algorithms

https://keymaterial.net/2025/12/13/a-very-unscientific-guide-to-the-security-of-various-pqc-algor...
1•todsacerdoti•33m ago•0 comments

How Did the CIA Lose a Nuclear Device?

https://www.nytimes.com/interactive/2025/12/13/world/asia/cia-nuclear-device-himalayas-nanda-devi...
4•wslh•37m ago•2 comments

Vibe Coding Is Boring

https://cassidoo.co/post/vibe-coding-yawn/
3•cassidoo•38m ago•1 comments

How Resilient Will the U.S. Consumer Be Without a Job?

https://www.bloomberg.com/opinion/articles/2025-12-12/do-powell-fed-think-consumers-will-be-ok-wi...
3•clanky•41m ago•1 comments

Apple locks account after redeeming gift card

https://daringfireball.net/linked/2025/12/13/buttfield-addison-apple-account
2•vsgherzi•43m ago•2 comments

The Great Cholesterol Scam and the Dangers of Statins

https://www.midwesterndoctor.com/p/the-great-cholesterol-scam-and-the
2•bilsbie•44m ago•0 comments

An Implementation of J

https://www.jsoftware.com/ioj/ioj.htm
2•ofalkaed•49m ago•0 comments

Interactive Common Lisp: An Enhanced REPL

https://github.com/atgreen/icl
2•atgreen•53m ago•0 comments

Why Wall Street is booming while Main Street is stagnating

https://www.gsb.stanford.edu/insights/why-wall-street-booming-while-main-street-stagnating
2•hhs•54m ago•1 comments

Gävle Goat

https://en.wikipedia.org/wiki/G%C3%A4vle_goat
2•29athrowaway•55m ago•0 comments

Gist of Go: Concurrency

https://antonz.org/go-concurrency/
1•valyala•56m ago•0 comments

First Robotics Competition

https://www.firstinspires.org/programs/frc/
1•TheBotlyNoob•58m ago•0 comments

Show HN: Brandcaster AI – On-brand Content Creator and Posting Agent

https://www.brandcaster.ai
1•jadbechara1•1h ago•0 comments

The claims of close reading

https://www.bostonreview.net/articles/the-claims-of-close-reading/
1•hhs•1h ago•0 comments

Tinker: General Availability and Vision Input

https://thinkingmachines.ai/blog/tinker-general-availability/
1•jacobedawson•1h ago•0 comments

Show HN: SigmaLifting – A protocol for powerlifting training data

https://sigmalifting.app/
2•jklioewr•1h ago•0 comments