gregvaughn
José, I just watched your Twitch stream of day 10 of Advent of Code and, as a fan of for comprehensions, I enjoyed the time you spent discussing potential extensions of them. I recall learning about the reduce option the last time you streamed AoC. I’d like to start a thread to discuss some of those things you discussed. Twitch
I have found myself treating for more like with and sometimes using = in the clauses. My initial thoughts are that it is not a big problem to expect that level of understanding in order to use a group_by or sort_by option. However, I might also be convinced of group_by and sort_by options being a function if they could receive a binding.
I also am intrigued by your suggestion of with. My first thought went to let (allowing multiple of those) in which case they are mutable and the for comprehension can return them as a second binding param.
More thoughts and discussion?
Trending in Discussions
Other Trending Topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 2 of 2 Posts
gregvaughn
I hesitate to ping you directly because I know you are busy @josevalim but from your day 13 Twitch livestream (Twitch) I see this is still on your mind.
I am in favor of how you have developed the
letidea within aforcomprehension (and how it can let us deprecate the:reduceoption). Like the live chatters in the livestream, I too have a concern aboutlet!/1so I would prefer that aforthat usesletreturn a 2 element tuple. Is there a benefit of the 2nd element of that tuple being abindingrather than a tuple of theletvars?josevalim
Oh, I missed this thread. Yeah, I should submit a proposal by today for for-let. It no longer has
thanks for the feedback!
let!but retains the rest of the proposal.