Using `with` as the Elixir replacement for `let` in Lisp

@dimitarvp

If your goal is to reduce the scope of variables then yes, with will work okay for it. Personally I’m not sure I see the value though. Any specific goal or use case that you have in mind?

Basically the same as let in Clojure, to assign a variable that can only be used within the scope. It may sound rudimentary for people used to Elixir, but they greatly reduces mistakes due to scope pollution in my opinion.

@benwilson512

What does “let” do if the map does not have that key?

No error handling as is the case with with.

@bunnylushington

Overloading with (not Elixir’s most obvious construct) with additional semantics seems like a maintenance issue waiting to happen.

No overloading is needed, this already works.