Reading through the source, I've noticed a common pattern of bodyless functions with default parameters. I have a few questions about them:
1) How does this mechanic work behind the scenes? I assume the function just gets recalled with the defaults filled in?
2) If the source is any indication, it's good form/a convention to declare method signatures with default parameters separately from their non-default signatures. Is there any difference between doing this and in-lining the default parameters in a single signature?
3) If so, what?
4) If not, what motivates the convention? (Easier refactoring somehow, smaller signatures before blocks of code being easier to read, etc)
5) Can bodyless functions be defined without default parameters in some useful way? (I can define them in console, but they throw an exception on invocation.)
6) If so, how would one use them?
Function bodies are required on a parser level in the languages I come from, so it never occurred to me that such constructs could exist, let alone be useful. Even understanding that the Elixir parser doesn't require them (since they're just keyword arguments to a macro), it never would have occurred to me to even try playing with them if I hadn't been reading the source. I'd like to fully understand this mechanic.
The more I use Elixir, the more it changes the way I think about languages. This might just be a weakness in my background, but by merit of it being an approachable functional language alone, learning it has been the most enjoyable and intriguing experience of my career. At the very least, it's changing the way I think about mapping a problem domain to a suitable tool on the language level, and that ain't bad.