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.

Reality as an Executable System: Computation and Historical Complexity

https://medium.com/@smoking2man/reality-as-an-executable-system-computation-historical-complexity...
1•Aldus551•1m ago•0 comments

How reliable are confidence scores from language models?

https://www.davidhartel.com/blog/language-model-confidence
3•dimmanuel•1m ago•0 comments

Show HN: Which colour has more dots? A quick visual guessing game

https://dotguess.com/
1•testGaussian•2m ago•0 comments

Show HN: MarkovChat – Meet people who share your intellectual interests

https://markovchat.com/
1•hackboyfly•3m ago•1 comments

OpenFile, 360 file tools that run in the browser with no uploads

https://openfile-studio.vercel.app/
2•aniruddha-adak•3m ago•0 comments

Infinite Scrolling Feed Example

https://www.w3.org/WAI/ARIA/apg/patterns/feed/examples/feed/
1•Brysonbw•3m ago•0 comments

Tips to get the best-suited candidates to apply to your job opening

https://fairats.com/blog/tips-to-get-the-best-suited-candidates-to-apply/
1•BrunoBernardino•3m ago•0 comments

Tell HN: First day in quite some time I feel optimistic about the future

3•reimertz•4m ago•1 comments

Spec-driven AI development for insurance claims rule changes [video]

https://www.youtube.com/watch?v=FRw3Og9tylE
1•Harish_0089•6m ago•0 comments

Ask HN: Is it still worth building and documenting projects the "old way"?

1•dhruv_ahuja•6m ago•0 comments

Jev 101 – A New Class of Model

https://data4sci.com/blog/jev-101
2•Anon84•11m ago•1 comments

Quest Journal

https://thedent.net/posts/quest-journal
1•surprisetalk•11m ago•0 comments

A map of 5000+ midterm ads

https://admap.org/
4•Eden09•12m ago•0 comments

Dolibarr, GLPI, PrestaShop: fifteen years of database schema, release by release

https://blog.mcdview.dev/en/dolibarr-glpi-prestashop-fifteen-years-of-schema/
1•PatuDev•16m ago•0 comments

Revolut slashes AI coding costs 10x by cutting out Claude and going self-hosted

https://www.theregister.com/ai-and-ml/2026/11/03/british-fintech-revolut-slashes-ai-coding-costs-...
3•_____k•17m ago•0 comments

Show HN: Rivermark, a superfast AI graphic design canvas

https://rivermark.ai/
1•thegeomaster•17m ago•0 comments

Can Advertising Fund Free AI? Evidence from ChatGPT's Advertising Rollout

https://ecommerceresearch.org/chatgpt-ads/
1•thm•18m ago•0 comments

Albert Einstein and Hannah Arendt's 1948 open letter on Israel

https://commons.wikimedia.org/wiki/File:Albert_Einstein_and_others_letter.jpg
2•olirex99•18m ago•0 comments

Valve making changes to deal with a 'significant increase' in Steam submission

https://www.theverge.com/games/1025722/valve-steam-game-increase-submissions
3•Tomte•20m ago•0 comments

Google DeepMind open-sources AlphaEvolve

https://github.com/google-deepmind/alphaevolve
2•wondersky•21m ago•0 comments

Show HN: 13M opinions on 48k products extracted from Reddit and HN

https://www.trustmebro.reviews/
3•davidzweig•22m ago•0 comments

A Social Networking App – Anonymous Live Group Chats

https://www.myraw.app/
1•welkhazen•22m ago•0 comments

One dev's rough outline of encrypted weights implementation

https://forums.developer.nvidia.com/t/questions-from-a-newcomer-gpu-confidential-computing-for-mu...
1•oogali•22m ago•0 comments

Hackers hit French national blood bank

https://www.telegraph.co.uk/world-news/2026/11/04/hackers-hit-french-blood-bank/
17•blaze33•22m ago•10 comments

Hibernate Lost My Update

https://bartoszosipiuk.pl/en/blog/hibernate-lost-my-update/
1•0x54MUR41•24m ago•0 comments

Forthcoming security update of Node.js; November 11, 2026

https://nodejs.org/en/blog/vulnerability/november-2026-security-releases
2•stevekemp•25m ago•0 comments

Show HN: Clootee, make Claude Code and codex easier to use

https://github.com/clootee/clootee
1•lingxiao10•27m ago•0 comments

The engineering around post-quantum cryptography is as important

https://github.com/lecodev-26/nexus-q
1•lecodev•27m ago•0 comments

Why the Term "Smart City Surveillance" Needs an Update in the Era of AI and 5G

https://www.red5.net/blog/smart-city-surveillance-in-the-era-of-ai-and-5g/
2•mondainx•28m ago•1 comments

Agent Meter – Native macOS menu bar monitor for CLI coding agents

https://github.com/amazingyyc/AgentMeter
1•real-amazingyyc•28m ago•0 comments