Closed mgwidmann closed 8 years ago
Additionally, all examples like
expect "This" |> to_eq "That"
Produce compiler warnings now like:
warning: you are piping into a function call without parentheses, which may be ambiguous. Please wrap the function you are piping into in parentheses. For example:
foo 1 |> bar 2 |> baz 3
Should be written as:
foo(1) |> bar(2) |> baz(3)
I think this is the biggest problem since the entire DSL depends upon this ambiguity. Writing the above as expect("This") |> to_eq("That")
doesn't work, the DSL wants instead expect("This" |> to_eq("That"))
which may be non-obvious to users.
For this reason it looks like the entire DSL needs an overhaul :disappointed:
Yeah, you're right about the DSL needing an overhaul... :disappointed:.
I'll try to look into it and see if I can make it work with parenthesis everywhere. Do you have any alternative ideas we could explore that would lead to a better DSL?
I would look to see if the code can be reworked internally to support the parens version as thats the simplest solution.
0.3.0
when releasing it.Yes, I think I can make it work with the parens syntax. After that is solved I'll release 0.3.0 with both fixes :smile:.
When upgrading to Elixir 1.2, because of the new
with
keyword, the following compile error is thrown:Putting
import Kernel, except: [with: 1]
beforeuse Pavlov.Case
does not seem to remedy the issue...