Re: [elixir-core:6312] Improvement: the syntax for importing functions from modules

2016-09-13 Thread Dmitry Belyaev
I personally find the reversed order of imports such as in python or typescript very unnatural. Consider tools that could suggest what is available to import. You first write the module for them to work, don't you? At least I do write 'import {} from module' in typescript and only then choose

Re: [elixir-core:6312] Re: why are zero arity anonymous functions not allowed?

2016-09-13 Thread Scott Parish
Thanks for the details! Makes a lot more sense now. On Wed, Sep 7, 2016 at 11:58 AM, wrote: > According to https://groups.google.com/forum/#!topic/elixir-lang- > core/GeXNvzzmdps, it seems that if you allow zero arity with & there is > an ambiguity when parsing the

Re: [elixir-core:6312] Improvement: the syntax for importing functions from modules

2016-09-13 Thread Norbert Melzer
I do not like the new python-like syntax for import, but to be honest, I do like to specify functions in `name/arity` instead of `{name, arity}`. Perhaps we can either build upon the division operator in the AST or we use the capture syntax as in `import Enum, /2`. This should be just an addition

Re: [elixir-core:6311] modules that are required automatically

2016-09-13 Thread Allen Madsen
Both `import` and `use` will do the require for you. See: http://elixir-lang.org/getting-started/alias-require-and-import.html Until I read this, I also didn't understand why I didn't need to use require everywhere. Allen Madsen http://www.allenmadsen.com On Tue, Sep 13, 2016 at 9:02 AM, Louis

[elixir-core:6311] Re: Improvement: the syntax for importing functions from modules

2016-09-13 Thread Onorio Catenacci
Hi Jaap, Is your basic concern the [function: arity] notation as opposed to the function/arity notation used in other places? I mean are you basically asking for the notation to be unified? If so, would [function/arity, function/arity] suffice assuming it were supportable? Something

Re: [elixir-core:6309] modules that are required automatically

2016-09-13 Thread Louis Pilfold
Functions do not need to be required, only macros :) Cheers, Louis On 13 September 2016 at 13:54, eksperimental wrote: > Thank you José for your answer, > so why is so I don't need to require IO and Enum? > > $ elixir -e "IO.inspect(Enum.at(1..5, 2))" > 3 > > > On

Re: [elixir-core:6306] modules that are required automatically

2016-09-13 Thread José Valim
You always need to require a module before using it. The only exception is the Kernel module. *José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R On Tue, Sep 13, 2016 at 6:40 AM, eksperimental wrote: > I'm hacking Elixir core, and I