Skip to content

Commit

Permalink
Update post
Browse files Browse the repository at this point in the history
  • Loading branch information
kitallis committed Aug 8, 2023
1 parent 3c5c3eb commit 1ff1c28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/post-2023-08-08T19:41:37.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ date = 2023-08-08T19:41:37
who = "kitallis"
+++

`then` in [Ruby](https://apidock.com/ruby/v2_6_3/Object/then) feels like a little sister to the `as->` [macro](https://clojuredocs.org/clojure.core/as-%3E) from clojure.
`then` in [Ruby](https://apidock.com/ruby/v2_6_3/Object/then) feels like a little sister to the `as->` [macro](https://clojuredocs.org/clojure.core/as-%3E) from Clojure.

Most of the API code (and several other parts) in Tramline heavily make use of `then`
Most of the API code (and several other parts) in Tramline heavily make use of `then`.

[example](https://github.com/tramlinehq/tramline/blob/main/app/libs/installations/github/api.rb#L20), [example](https://github.com/tramlinehq/tramline/blob/main/app/libs/installations/gitlab/api.rb#L62), [example](https://github.com/tramlinehq/tramline/blob/main/app/libs/installations/google/firebase/api.rb#L49).

Expand All @@ -25,7 +25,7 @@ The above feels more natural and less noisy than naming each intermediate step w

The second one is a controversial (perhaps even wrong) point. It seems to me that since `then` is just a function, the general debuggability of something going wrong in the pipeline is easier to find out in the chain.

My (now fading) experience with threading macro debuggability in clojure has been less efficient; I end up adding taps and spies to figure out what part of the chain broke.
My (now fading) experience with threading macro debuggability in Clojure has been less efficient; I end up adding taps and spies to figure out what part of the chain broke.

I prefer an experience like:

Expand Down

0 comments on commit 1ff1c28

Please sign in to comment.