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.

Show HN: I built a JSON-to-PDF book generator because formatting was killing me

https://ebookforge.app/
1•mxprs•44s ago•0 comments

China's Firefox of the Seas: New Trimaran Semi-Sub

http://www.hisutton.com/Chinese-Semi-Sub.html
1•wood_spirit•3m ago•0 comments

Creating the HBO Intro in 1982 by Liberty Studios in NYC

https://twitter.com/ComputerLove_/status/1997125753289474289
1•keepamovin•4m ago•0 comments

Ask HN: If the US loses, what do you think the world will look like in 15 years?

1•keepamovin•5m ago•0 comments

Programming Neo6502 in C/C++ Using CC65

https://retrogamecoders.com/neo6502-cc65/
1•AlexeyBrin•13m ago•0 comments

Is there a finer Latin word than silvicultrix, 'she who dwells in the woods'?

https://twitter.com/miserabiliter/status/1997052244144046279
1•keepamovin•15m ago•0 comments

Show HN: I built SharpSkill because I was frustrated of my Tech interviews

https://sharpskill.fr/en
1•Enjoyooor•19m ago•1 comments

ARM's Barrel Shifter Tricks

https://xania.org/202512/05-barrel-shifting-with-arm
1•gsky•20m ago•0 comments

Show HN: The Port Augusta Times – "All the news that's fit to generate"

https://henrygabriels.github.io/port-augusta-times/index.html
1•gabriel666smith•24m ago•0 comments

Fivehundred reasons to not use Azure

https://mastodon.social/@azureshit
1•privatermodus•25m ago•0 comments

Running TigerBeetle without a control plane database. Part one

https://aivarsk.com/2025/12/06/tigerbeetle-without-olgp-database1/
1•aivarsk•25m ago•0 comments

Show HN: isitworththetime.com – Calculate if automating saves time

https://isitworththetime.com/
1•liam-gray•26m ago•0 comments

Lisp Style & Design (1990) [pdf]

https://archive.org/download/miller-and-benson-1990-lisp-style-design/Miller%20and%20Benson%20-%2...
2•susam•27m ago•0 comments

"I'll leave you to it"

https://notoneoffbritishisms.com/2025/12/05/ill-leave-you-to-it/
1•jjgreen•30m ago•0 comments

Compiler Design Lectures [video]

https://www.youtube.com/playlist?list=PL3690D679B876DE6A
1•cyco130•33m ago•1 comments

Novel clickjacking attack relies on CSS and SVG

https://www.theregister.com/2025/12/05/css_svg_clickjacking/
1•jjgreen•35m ago•0 comments

Borges on Kalshi

https://www.mikealche.com/uncategorized/borges-on-kalshi
2•yoouareperfect•37m ago•0 comments

Why Speed Matters

https://lemire.me/blog/2025/12/05/why-speed-matters/
12•gsky•39m ago•1 comments

AI chatbots can sway voters better than political advertisements

https://www.technologyreview.com/2025/12/04/1128824/ai-chatbots-can-sway-voters-better-than-polit...
2•_tk_•40m ago•0 comments

DNS over TLS with LetsEncrypt

https://blog.hardill.me.uk/2025/12/06/dns-over-tls-with-letsencrypt/
4•gsky•48m ago•0 comments

Ask HN: What's Been Your Experience Implementing Web Accessibility?

1•lalithaar•48m ago•2 comments

Physicists prove the Universe isn't a simulation after all

https://www.sciencedaily.com/releases/2025/11/251110021052.htm
8•webnrrd2k•48m ago•6 comments

Show HN: Stateless TikToken and Unix-Dictionary GitHub URL Shortener

https://selfdotsend.com/shorty/
1•pankajdoharey•51m ago•0 comments

Show HN: Trello Clone with Source Code

https://kanban.demo.codegres.com/
1•Codegres•55m ago•0 comments

Touching the Elephant – TPUs

https://considerthebulldog.com/tte-tpu/
2•giuliomagnifico•56m ago•1 comments

Self-hosted RSS reader with Docker and HTTPS

https://github.com/ggeorgovassilis/selfhosted-reader
2•ggeorgovassilis•1h ago•1 comments

John Oliver Auction Raises $1.5M for Public Broadcasting

https://www.techdirt.com/2025/12/05/john-oliver-auction-raises-1-5-million-for-public-broadcasting/
3•thunderbong•1h ago•0 comments

US Flips History by Casting Europe–Not Russia–As Villain in New Security Policy

https://www.wsj.com/world/europe/u-s-flips-history-by-casting-europenot-russiaas-villain-in-new-s...
6•layer8•1h ago•0 comments

Desantis Proposal for Citizens Bill of Rights for AI

https://www.flgov.com/eog/news/press/2025/governor-ron-desantis-announces-proposal-citizen-bill-r...
1•yankeehue•1h ago•0 comments

Why Apple Is Moving Intelligence Back to Your Laptop

https://www.apple.com/
4•alternativeto•1h ago•2 comments