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.

AI inference is obviously profitable

https://www.seangoedecke.com/ai-inference-is-obviously-profitable/
1•emirb•1m ago•0 comments

Africans Are Turning to Starlink

https://www.economist.com/middle-east-and-africa/2026/07/02/africans-are-turning-to-starlink
5•bookofjoe•7m ago•1 comments

Ads in ChatGPT

https://ads.openai.com/
3•vlan121•7m ago•0 comments

RememberLI

https://github.com/KlausSchaefers/rememberli
1•klausschaefers•9m ago•0 comments

Special forces ban Volvo/Chinese electric cars over spying fears

https://www.telegraph.co.uk/news/2026/07/03/special-forces-bans-chinese-cars-spying-fears-volvo/
2•cwwc•9m ago•0 comments

Show HN: Mlx-serve – LLM inference server for Apple Silicon, written in Zig

https://mlxserve.com/
1•ddalcu•9m ago•0 comments

MiniKotlin – A Kotlin Compiler That Runs in a Browser Tab

https://minikotlin.run
1•TheWiggles•12m ago•0 comments

Show HN: ContextCodeCache in Rust

https://github.com/colwill/ccc
1•colwont•12m ago•0 comments

Show HN: Maestro – scaffold Go microservices and keep them in sync

https://github.com/Zagforge-Org/maestro
1•anzedev•13m ago•0 comments

Collabora Office 26.04 Keeps AI Optional and Refines Writer and Calc

https://itsfoss.com/news/collabora-office-26-04/
1•mmarian•14m ago•0 comments

Mistralai/Leanstral-1.5-119B-A6B

https://huggingface.co/mistralai/Leanstral-1.5-119B-A6B
1•satvikpendem•15m ago•0 comments

Meta AI chief says their coming LLM has caught up with OpenAI's flagship model

https://www.businessinsider.com/meta-ai-model-catches-up-openai-gpt-5-says-2026-7
2•maxloh•15m ago•0 comments

Sumit Rana to Step Away from Epic

https://www.healthcareittoday.com/2026/07/03/breaking-news-sumit-rana-to-step-away-from-epic/
1•Forge36•19m ago•0 comments

Ask HN: What did you fail at and what did you learn from it?

1•basilikum•19m ago•0 comments

Jj v0.43.0 Released

https://github.com/jj-vcs/jj/releases/tag/v0.43.0
1•birdculture•21m ago•0 comments

Camera with transparent display launches for the equivalent of $29

https://www.notebookcheck.net/Camera-with-transparent-display-launches-for-the-equivalent-of-29.1...
2•yread•21m ago•1 comments

Congressman says hack of his Signal account proves app is unsecure. Is it true?

https://san.com/cc/congressman-says-hack-of-his-signal-account-proves-app-is-unsecure-is-it-true/
3•devonnull•25m ago•0 comments

Show HN: How clanker are you? A reverse Turing test

https://howclankerareyou.com/
3•niklio•31m ago•1 comments

Ross Spiral Curriculum

https://spiral.ross.org/spiral/#/
1•el3ctron•33m ago•0 comments

Palantir and the NHS – things you need to know

https://theconversation.com/palantir-and-the-nhs-10-things-you-need-to-know-281165
1•abdelhousni•33m ago•1 comments

Applied Category Theory Course (2018)

https://math.ucr.edu/home/baez/act_course/index.html
2•measurablefunc•34m ago•0 comments

A Runtime Modulation Layer for Large Language Models

https://github.com/divinecanon/signalengine-EN-
1•w89780175•35m ago•0 comments

OpenCode, Pi, and Goose: Three Layers of the AI Agent Stack

https://gist.github.com/AIMOWAY/bd8007c8f834a9bc83c71e3178239d75
1•AIMOWAY•37m ago•0 comments

Espionage Against the European Parliament

https://citizenlab.ca/research/member-of-committee-investigating-spyware-hacked-with-pegasus/
14•ledoge•37m ago•0 comments

Giving a domain a hill to climb: benchmarking as data activation

https://sparsethought.com/2026/07/03/benchmarking-as-data-activation/
3•galsapir•43m ago•1 comments

AI Is Boring

2•sverp•43m ago•1 comments

Deterministic Guardrails Against AI Code Duplication

https://www.technology.org/2026/07/03/dupehound-deterministic-guardrails-against-ai-code-duplicat...
1•rafaepta•44m ago•0 comments

Música Do Círculo

https://www.guidavid.com/writing/musica-do-circulo
1•gdss•47m ago•0 comments

Show HN: Sharing LLM Artifacts with your team

https://github.com/danielpang/dropway
2•d_pang•49m ago•0 comments

Doing the Work

https://bran.name/doing-the-work.html
3•branneman•49m ago•2 comments