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 what actually I 
import.  So to me the current Elixir way has far more sense. 

On 13 September 2016 14:30:36 GMT+10:00, Jaap Frolich <[email protected]> 
wrote:
>Hi,
>
>Currently when we import a single or a few functions from a module this
>is 
>the syntax to do it:
>
>  import Record, only: [defrecord: 2, extract: 2]
>
>As this is something that is something quite common to do in a module,
>the 
>syntax can be more user-friendly in my opinion.
>
> 1. The notation for a function is captured in data, while normally we 
>   describe functions with the function/arity notation
>  2. By default it imports *everything*, as this is often not what you 
>   want, it might be better to make it more explicit
>3. Aesthetics, but that might be personal, I think it does not read as 
>   nice
>
>So how about having something like below syntax in the language:
>
>  import defrecord/2, extract/2 from Record
>
>  import * from Record
>
>This might be hard to implement, other candidates could be:
>  
>  import {defrecord/2, extract/2}, from: Record
>  
>  import {*}, from: Record
>
>As it might be easier to implement in the language using macros.
>
>(while we keep the existing import macro around.)
>
>Let me know what you think!
>
>Cheers,
>
>Jaap
>
>-- 
>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/4e514d59-05bd-41c6-a1d5-a634b34ff350%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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/EFD2DCD2-6055-4DC7-B981-BA47281404AB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to