Btw Dave, it is really nice to see you are exploring a property testing library. When Andrea proposed for one to be introduced in Elixir, I said we should explore the ability of building generators as streams and that's exactly what you did with pollution. I loved "when factories meet streams". I hope to play with this relatively soon. :)
*José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D On Sat, Dec 3, 2016 at 4:36 AM, Dave Thomas <[email protected]> wrote: > I've been living with 1.4 for a few weeks now. > > I am bugged by the new warning: > > ~~~ > warning: variable "int" does not exist and is being expanded to "int()", > please use parentheses to > remove the ambiguity or change the variable name > > test/generators/int_test.exs:10 > ~~~ > > Partly it is because it makes my code a lot uglier. For example, in > quixir, instead of > > ~~~elixir > test "two plain types" do > ptest a: int, b: list do > assert is_integer(a) > assert is_list(b) > end > end > ~~~ > > I now have to write: > ~~~ elixir > test "two plain types" do > ptest a: int(), b: list() do > assert is_integer(a) > assert is_list(b) > end > end > ~~~ > > Ugh. > > Even worse, the premise of the warning seems wrong. It assumes `int` is a > variable, which doesn't exist. But it _does_ know that `int` is a function, > because if I misspell it and put ()s on, I get a compilation error. So why > can't it just do that: is a bare name is encountered that isn't a variable, > just internally tack on the ()s are see what happens. Which I think is the > old way. > > Basically, what compelling problem drove this change? It isn't an issue I > ever had before, and the change seems to make my code worse. > > > 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/924b70db-79f1-43c1-afc7- > 49a94cd541e5%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/924b70db-79f1-43c1-afc7-49a94cd541e5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAGnRm4J_FARpqqi5ex9frQTe_ta6kUQxjne8VJ8EYMT6wQ5Shg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
