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

Comments

zoezoezoezoe•8mo 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•8mo 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: Lwt-to-Eio – Automated Migration from Lwt to OCaml 5 Direct Style

https://github.com/oug-t/lwt-to-eio
1•oug-t•2m ago•1 comments

Will the 'Scandinavian sleep method' help me sleep?

https://theconversation.com/will-the-scandinavian-sleep-method-really-help-me-sleep-270359
1•PaulHoule•12m ago•2 comments

Everything Becomes an Agent

https://allen.hutchison.org/2026/01/15/everything-becomes-an-agent/
1•gregorymichael•12m ago•0 comments

Show HN: Gambit, an open-source agent harness for building reliable AI agents

https://github.com/bolt-foundry/gambit
4•randall•12m ago•0 comments

My Gripes with Prolog

https://buttondown.com/hillelwayne/archive/my-gripes-with-prolog/
5•azhenley•14m ago•0 comments

WinBoat: Drive by Client RCE and Sandbox Escape

https://hack.do/posts/winboat-guest-service-host-rce/
1•mattaustin•14m ago•0 comments

Amazon Is Buying America's First New Copper Output in More Than a Decade

https://www.wsj.com/finance/commodities-futures/amazon-is-buying-americas-first-new-copper-output...
2•petethomas•15m ago•0 comments

I Mapped Over 300,000 Brands

https://ranchbrandsearch.com/brand/map
1•carshodev•18m ago•1 comments

YBOOK: First Million in Crypto

https://cryptobookz.com/i/your-first-million-in-crypto
1•zenull•18m ago•1 comments

Lex-Gql: GraphQL for AT Protocol

https://tangled.org/chadtmiller.com/lex-gql
1•danabramov•19m ago•0 comments

Bluetooth – Origin of the Name

https://www.bluetooth.com/about-us/bluetooth-origin/
1•rvnx•20m ago•0 comments

List of Individual Trees

https://en.wikipedia.org/wiki/List_of_individual_trees
3•wilson090•20m ago•0 comments

"You Had One Job": Why Twenty Years of DevOps Has Failed to Do It

https://www.honeycomb.io/blog/you-had-one-job-why-twenty-years-of-devops-has-failed-to-do-it
1•gpi•21m ago•0 comments

HTTP RateLimit Headers

https://dotat.at/@/2026-01-13-http-ratelimit.html
2•fanf2•23m ago•0 comments

A superforecaster shares what bottom-feeders can teach about consuming media

https://goodjudgment.com/dont-take-the-bait/
2•hhs•24m ago•1 comments

Show HN: Camera calibration directly in browser for SLAM

https://twitter.com/_asadmemon/status/2011845487180333250
1•asadm•26m ago•0 comments

All 23-Bit Still Lifes Are Glider Constructible

https://mvr.github.io/posts/xs23.html
2•HeliumHydride•26m ago•0 comments

The Magic of the Better Software Conference

https://www.rfleury.com/p/the-magic-of-the-better-software
2•chmaynard•27m ago•0 comments

The Honey Scam Is Worse Than I Thought

https://www.youtube.com/watch?v=qCGT_CKGgFE
1•Tadpole9181•27m ago•0 comments

Invading Greenland? Mistake of a Lifetime [video]

https://www.youtube.com/watch?v=8hdthsG8tks
1•emsign•28m ago•0 comments

A Game to Align People and Priorities

https://dmvaldman.github.io/alignment-game/
1•dmvaldman•29m ago•0 comments

Timeplus now natively support splunk S2S protocol

https://www.timeplus.com/post/splunk-s2s
1•gangtao•32m ago•0 comments

Venezuelan Nobel Peace Prize winner presents her medal to Trump

https://www.bbc.com/news/articles/cx2w94wp4p1o
3•RickJWagner•32m ago•3 comments

Intraoperative tumor histology may enable more-effective cancer surgeries

https://www.caltech.edu/about/news/intraoperative-tumor-histology
1•hhs•33m ago•0 comments

Etymology of the Word W00T

https://en.wiktionary.org/wiki/w00t
2•dustfinger•35m ago•1 comments

Make Google Forms UI look better

https://www.formglam.pro/
1•yatinseelam•36m ago•0 comments

Tech Workers Are Condemning ICE Even as Their CEOs Stay Quiet

https://www.wired.com/story/backlash-against-ice-policing-tactics-grows-in-silicon-valley/
2•abdelhousni•37m ago•1 comments

The latest Firefox version broke ChatGPT website

https://old.reddit.com/r/ChatGPT/comments/1qdwexl/chatgpt_website_broken_in_firefox/
3•vanni•37m ago•2 comments

Guys, I'm Scared

https://www.thock.pro
1•krunkworx•37m ago•3 comments

Craftlings

https://store.steampowered.com/app/1771110/Craftlings/
1•doener•37m ago•1 comments