Hello!
As you all know, namespace is important global identifier of your files. It is hard to impossible to change later (especially when your code is library and someone is already using it), so it should be chosen wisely at the beginning. In Java (and probably other languages), the namespace is often created from a webpage or email by reverting the domain name, thus leading to: com.github.johndoe.fooproject com.gmail.johndoe.fooproject But because requirejs has problem with dots, we cannot use them. Now, the poll question: `amber init` will by default try to construct the namespace for you (from repo url and/or your email) and present you with the default choice. Which of these two would you like to have there: com-github-jackdoe-barproject, or com/github/jackdoe/barproject ? The former is one flat name for a namespace. The latter is in fact a (symbolic) path for AMD loader (as is the former, just it's always a single-element path). Pros of the former one: flatness, so simplicity Cons of the former one: you must map each one to the deploy location Pros of the latter one: you can map just the subpath Cons of the latter one: it may be more complicated with more levels Herby P.S.: We (at least Manfred and me) do not actually consider any other delimiter, because we want the namespace name to be (even officially) url-safe. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
+1 for url friendly
and the incentives of using / are negligible simplicity wins BTW, I don’t even see as a con to have an explicit map of each package to load, so it will be double win for me if the - separator prevails keep up the good work On May 6, 2014, at 10:49 AM, Herby Vojčík <[hidden email]> wrote: > Hello! > > As you all know, namespace is important global identifier of your files. It is hard to impossible to change later (especially when your code is library and someone is already using it), so it should be chosen wisely at the beginning. > In Java (and probably other languages), the namespace is often created from a webpage or email by reverting the domain name, thus leading to: > > com.github.johndoe.fooproject > com.gmail.johndoe.fooproject > > But because requirejs has problem with dots, we cannot use them. > > Now, the poll question: `amber init` will by default try to construct the namespace for you (from repo url and/or your email) and present you with the default choice. Which of these two would you like to have there: > > com-github-jackdoe-barproject, or > com/github/jackdoe/barproject ? > > The former is one flat name for a namespace. The latter is in fact a (symbolic) path for AMD loader (as is the former, just it's always a single-element path). > > Pros of the former one: flatness, so simplicity > Cons of the former one: you must map each one to the deploy location > > Pros of the latter one: you can map just the subpath > Cons of the latter one: it may be more complicated with more levels > > Herby > > P.S.: We (at least Manfred and me) do not actually consider any other delimiter, because we want the namespace name to be (even officially) url-safe. > > -- > You received this message because you are subscribed to the Google Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Herby Vojčík
Hi,
I don't very much like the java-style namespaces (com.example.dept.me<http://com.example.dept.me> etc) concention. The Ruby community uses given project names (eg Hpricot) as namespaces for mixins - much more semantic and easier to remember, and much more relevant to the user of the project (eg. require 'Hpricot' vs. import com.google.gson.Gson ...) Can we, for the sake of communicating and aesthetic code, use project names? -- Siemen You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Siemen Baader wrote: > Hi, > > I don't very much like the java-style namespaces (com.example.dept.me They _need_ to be globally usable without change. > <http://com.example.dept.me><http://com.example.dept.me> etc) > concention. The Ruby community uses given project names (eg Hpricot) > as namespaces for mixins - much more semantic and easier to remember, > and much more relevant to the user of the project (eg. require > 'Hpricot' vs. import com.google.gson.Gson ...) > > Can we, for the sake of communicating and aesthetic code, use project > names? No, if it has danger of having nameclashes. Of course, you can choose any namespace you want for your project. But if it is a library, someone may hate you by choosing too general word. Anyway, what's your answer to the poll (use - or / separated ones as the default choice in amber init)? > -- Siemen -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Siemen Baader
On May 7, 2014, at 9:59 AM, Siemen Baader <[hidden email]> wrote: I don't very much like the java-style namespaces (com.example.dept.me<http://com.example.dept.me> etc) concention. The Ruby community uses given project names (eg Hpricot) as namespaces for mixins - much more semantic and easier to remember, and much more relevant to the user of the project (eg. require 'Hpricot' vs. import com.google.gson.Gson ...) I know what you mean Siemen Big +1 to all you’ve said We shouldn’t pretend we have 100 thousand members in the community and 20 Million projects making name clashing a frequent occurrence. Even if Amber ends up implementing such namespaces I’ll most probably use only one word every time. Complicators gonna complicate You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Herby Vojčík
Herby,
On 07 May 2014, at 15:07, Herby Vojčík <[hidden email]> wrote: > > Siemen Baader wrote: >> Hi, >> >> I don't very much like the java-style namespaces (com.example.dept.me > > They _need_ to be globally usable without change. I know - hence the reasoning behind reverse URLs. A long Hash will technically do the same job.. > >> <http://com.example.dept.me><http://com.example.dept.me> etc) concention. The Ruby community uses given project names (eg Hpricot) as namespaces for mixins - much more semantic and easier to remember, and much more relevant to the user of the project (eg. require 'Hpricot' vs. import com.google.gson.Gson ...) >> >> Can we, for the sake of communicating and aesthetic code, use project names? > > No, if it has danger of having nameclashes. Of course, you can choose any namespace you want for your project. But if it is > a library, someone may hate you by choosing too general word. Of course. As it was the case with Amber, when the Sproutcore project was renamed to Amber, then to Ember to avoid the clash with Amber [1]. These folks are gentlemen. I think it is better to deal with these things at the social level, and keep the code clean and a clear connection between the project name and the namespace that gets imported. What do you think, Herby? 1: http://yehudakatz.com/2011/12/12/amber-js-formerly-sproutcore-2-0-is-now-ember-js/ -- Siemen > > > Anyway, what's your answer to the poll (use - or / separated ones as the default choice in amber init)? > >> -- Siemen > > -- > You received this message because you are subscribed to the Google Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by sebastianconcept
sebastian wrote: > > On May 7, 2014, at 9:59 AM, Siemen Baader <[hidden email] > <mailto:[hidden email]>> wrote: > >> I don't very much like the java-style namespaces (com.example.dept.me >> <http://com.example.dept.me/><http://com.example.dept.me >> <http://com.example.dept.me/>> etc) concention. The Ruby community >> uses given project names (eg Hpricot) as namespaces for mixins - much >> more semantic and easier to remember, and much more relevant to the >> user of the project (eg. require 'Hpricot' vs. import >> com.google.gson.Gson ...) >> >> Can we, for the sake of communicating and aesthetic code, use project >> names? > > I know what you mean Siemen > > Big +1 to /all/ you’ve said > > We shouldn’t pretend we have 100 thousand members in the community and > 20 Million projects making name clashing a frequent occurrence. It's a nameclash not in Amber community per se, but nameclash in AMD module space. Lots of modules in there are nice an d do not hardcode their names (except those who can, like 'jquery'). We, to list the dependencies between different modules, have to. If there is another similar kind of product, with lots of modules which are interdependent and need not to change their name, we may well be doomed. Come up with better solution... for example using amber/modulename/ an automatic prefix for amber packages (so having amber/core/Kernel-Objects, amber/trapped/Trapped-Backend or amber/roassal/Roassal-Tests. > Even if Amber ends up implementing such namespaces I’ll most probably > use only one word every time. Hm. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Siemen Baader
Siemen Baader wrote: > Herby, > > On 07 May 2014, at 15:07, Herby Vojčík<[hidden email]> wrote: > >> Siemen Baader wrote: >>> Hi, >>> >>> I don't very much like the java-style namespaces (com.example.dept.me >> They _need_ to be globally usable without change. > > I know - hence the reasoning behind reverse URLs. A long Hash will technically do the same job.. > >>> <http://com.example.dept.me><http://com.example.dept.me> etc) concention. The Ruby community uses given project names (eg Hpricot) as namespaces for mixins - much more semantic and easier to remember, and much more relevant to the user of the project (eg. require 'Hpricot' vs. import com.google.gson.Gson ...) >>> >>> Can we, for the sake of communicating and aesthetic code, use project names? >> No, if it has danger of having nameclashes. Of course, you can choose any namespace you want for your project. But if it is >> a library, someone may hate you by choosing too general word. > > Of course. As it was the case with Amber, when the Sproutcore project was renamed to Amber, then to Ember to avoid the clash with Amber [1]. These folks are gentlemen. > > I think it is better to deal with these things at the social level, and keep the code clean and a clear connection between the project name and the namespace that gets imported. > > What do you think, Herby? Well, I don't like long java namespaces as well - but I want something that works. I could just change it to 'amber-'+projectName.toLowerCase(). That could work as well. > 1: http://yehudakatz.com/2011/12/12/amber-js-formerly-sproutcore-2-0-is-now-ember-js/ > > -- Siemen > >> >> Anyway, what's your answer to the poll (use - or / separated ones as the default choice in amber init)? >> >>> -- Siemen -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
On May 7, 2014, at 11:00 AM, Herby Vojčík <[hidden email]> wrote:
That seems to have the best of both worlds I’d support something like that You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Herby Vojčík
On 07 May 2014, at 16:00, Herby Vojčík <[hidden email]> wrote: > > I could just change it to 'amber-'+projectName.toLowerCase(). That could work as well. Sounds good... -- Siemen -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
On 5/7/14, Siemen Baader <[hidden email]> wrote:
> > On 07 May 2014, at 16:00, Herby Vojčík <[hidden email]> wrote: >> >> I could just change it to 'amber-'+projectName.toLowerCase(). That could >> work as well. +1 > Sounds good... > > -- Siemen > > -- > You received this message because you are subscribed to the Google Groups > "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [hidden email]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by sebastianconcept
sebastian writes: > On May 7, 2014, at 11:00 AM, Herby Vojčík <[hidden email]> wrote: > >> >> I could just change it to 'amber-'+projectName.toLowerCase(). That >> could work as well. Yes. Do that, it's simpler and still avoids broader name clashed with other modules. Cheers, Nico -- Nicolas Petton http://nicolas-petton.fr -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |