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.

Why would someone want to learn code when AI does it better and faster?

1•manimonji•39s ago•0 comments

The unreasonable effectiveness of simple HTML

https://shkspr.mobi/blog/2021/01/the-unreasonable-effectiveness-of-simple-html/
1•gurjeet•42s ago•0 comments

Riemann-Bench

https://surgehq.ai/leaderboards/riemann-bench
1•Topfi•50s ago•0 comments

What Investment Data Implies about the AI Transition

https://www.nber.org/papers/w35290
1•paulpauper•1m ago•0 comments

AI is eating the AI Engineering Loop

https://twitter.com/lotte_verheyden/status/2064415370761646410
1•gmays•1m ago•0 comments

Thrindex – memory OS for AI agents (ranks, compresses and evolves agents memory)

https://www.thrindex.com/
1•teo-nomikos•1m ago•0 comments

Search Results Are Getting Sloptimized

https://www.theatlantic.com/technology/2026/06/google-search-ai-optimization/687495/
2•paulpauper•3m ago•0 comments

Context Is Built, Not Calculated

https://blog.bridgexapi.io/context-is-built-not-calculated
1•Bridgexapi•3m ago•0 comments

Validation Enhancer – Progressive web-form enhancer

https://www.npmjs.com/package/validation-enhancer
1•gurjeet•3m ago•0 comments

We are in the era of Science Slop

https://superposer.substack.com/p/we-are-in-the-era-of-science-slop
1•paulpauper•5m ago•0 comments

Supermicro Stock Falls on Plans to Raise $7B in Capital

https://catenaa.com/markets/equities/supermicro-stock-falls-on-plans-to-raise-7bn-in-capital/
1•NewsCatenaa•5m ago•1 comments

The Jqwik Anti-AI Affair

https://blog.johanneslink.net/2026/06/09/the-jqwik-anti-ai-affair/
1•_____k•7m ago•0 comments

A line-by-line translation of the OCaml runtime from C to Rust

https://discuss.ocaml.org/t/a-line-by-line-translation-of-the-ocaml-runtime-from-c-to-rust/18247
2•bwuno•9m ago•0 comments

Making Semgrep rip: How Ripgrep inspired us to shave hours off (some) scans

https://semgrep.dev/blog/2026/making-semgrep-rip-how-ripgrep-inspired-us-to-shave-hours-off-some-...
3•bkettle•10m ago•0 comments

I'm a product manager. My code merges without an engineer reading the diff

https://nextwaveoftech.com/posts/code-merges-without-reading-the-diff
1•theanonymousone•11m ago•0 comments

Steve Jobs responds to question about artificial intelligence, IDCA, 1983 [video]

https://www.youtube.com/watch?v=tkzGtGzXIEc
1•evo_9•12m ago•0 comments

The unwritten laws of software engineering

https://newsletter.manager.dev/p/the-unwritten-laws-of-software-engineering
3•birdculture•16m ago•2 comments

A Twist in Ukraine's Drone Campaign Is 'Hurting the Russians'

https://www.nytimes.com/2026/06/10/world/europe/ukraine-midrange-logistics-strikes.html
3•JumpCrisscross•17m ago•0 comments

Apple Made a Sports App That Does Almost Nothing. It's Incredible

https://slate.com/technology/2026/06/fifa-world-cup-apple-app-sports.html
5•ForHackernews•18m ago•0 comments

The Analog Thing – Analog Computing for the Future

https://the-analog-thing.org
3•jensgk•20m ago•0 comments

Life on the edge of Musk's Starbase brings fortunes and fractures

https://www.reuters.com/business/aerospace-defense/musks-starbase-rise-spacex-brings-fortunes-fra...
1•JumpCrisscross•20m ago•0 comments

A whale necropolis has been found

https://www.nature.com/articles/d41586-026-01581-x
1•tigerlily•20m ago•0 comments

Should we care any more about Googlebot crawling our sites?

https://utcc.utoronto.ca/~cks/space/blog/web/DoYouNeedGooglebotCrawling
1•speckx•21m ago•0 comments

Splunk Enterprise PostgreSQL sidecar has no auth (CVE-2026-20253, CVSS 9.8)

https://hellorecon.com/blog/cve-2026-20253
2•slvnx•22m ago•0 comments

The Abundance Illusion

https://www.carlyle.com/carlyle-compass/the-abundance-illusion
2•cwal37•22m ago•0 comments

A strong, reversible, and conformal adhesive gel for diverse plants

https://www.science.org/doi/10.1126/sciadv.adz6379
1•PaulHoule•22m ago•0 comments

Quick: An internal hosting platform for the AI era

https://shopify.engineering/quick
1•okneil•23m ago•0 comments

Dao Heart v3.14

https://github.com/Mankirat47/Dao-Heart-v3.14
1•Mankirat47•24m ago•0 comments

Microsoft.UI.Reactor: A declarative, component-based C# framework for WinUI apps

https://github.com/microsoft/microsoft-ui-reactor
2•therloux•24m ago•0 comments

A Love Story

https://pudding.cool/2026/06/love-story/
2•gmays•27m ago•0 comments