But if it is desirable in iex, and acceptable in pipelines, why not other 
code?

I just don’t get why this is such a problem. Having 

setup do
  {:ok, conn: conn(:get, "/foo/bar")}
end

seems to be just bad naming. They are deliberately choosing to have a key 
with the same name as a function. That seems to be confusing in its own 
right. If this causes a test to fail, I think that’s a good thing, as it 
might spur the writer to rethink the naming.

I think the same thing applies with 

int = 42
ptest list: list(length: int, of: int) do  
 assert ...end

All the arguments I’ve seen so far have nothing to do with 
function/variable ambiguity. They are simply to do with name clashes. They 
are no different to

size = 42

# some code ...

size = &String.length/1

ptest list: list(length: size, of: choose(atom, int)) do
  assert ...
end

Both this and the function/variable case fail because a name was used 
twice. It’s a case of Caveat Coder.



Dave
​

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/91499b33-0a4d-4dd0-9566-a4ced686f5a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to