-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename Deno into deno #2069
Comments
We used to (at least conventionally) have it as |
Yes, sometimes namespace objects of core JS/TS are named in PascalCase. But Upd: I may even assume that the convention of naming in core JS is taking its roots from Java. Because as we know from history of JS, the initial version of JS syntax was mostly taken from Java (this is why we have this link in its name), and later the TC39 was just following the initial convention, even though it's not in line with new "traditions", just in the sake of consistency |
It seems modern web namespaces use lower-case names. Example https://developer.mozilla.org/en-US/docs/Web/API/Performance Also "deno" is one less button to type vs "Deno". |
It's still available though: |
Casing has nothing to do with modern vs legacy. |
Since both seem to be current and valid semantics, I would say there is no value in the code churn then. |
Just my two cents: I think you should buck the trend and be radical (keep it) like Deno vs. Node (or is it node?). |
DOM, BOM or environment api typically using camelCase: EcmaScript modules use UpperCamelCase: EcmaScript functions use camelCase: I think that both Deno and deno with a constructor Deno are conventional. |
Yes, but you should not do that. I think it's obvious why
Are you sure that is not because in Java everything is a class? Because we have words of Brendan Eich The diktat from upper engineering management was that the language must "look like Java"
That's, right. And since Deno is not an ECMAScript module and not a constructor, it should not be in UpperCamelCase but in camelCase |
Why is it obvious?
But it isn't a DOM namespace either, so it shouldn't use camelCase. Same logic. |
Because there are expectations that other people have about your code. And such things would break the expectations and bring confusion. Also, it would break the consistency. And it would bring even more confusion Let me give you some real-world examples: you are not overriding ES3 array methods like
No. The logic is that |
Modules are self contained and should not lead and of the
It isn't a host variable. It is a global namespace. We have examples where these are CamelCase (e.g.
A pointed out above, it is not the de-facto in modern JavaScript. TC39 continue to use CamelCas. It is the W3C in the browser which have used camelCase. |
I'm not talking about technical aspect, but about mental. The problem you are talking about would be solved with Realms. But even when we would have Realms you still should not change interfaces of array methods and other stuff like that. Because it is confusing Unless you are the only person who is working with the codebase - in this case, you can do whatever you want, of course
And I have written before why TC39 continues to use UpperCamelCase even though in userland and environments de-facto standard is camelCase |
Just so we are all on the same page,
Neither of these is a host variable - that isn’t a thing in the Unix world, unless you’re referring to $HOST which is sometimes an alias for $HOSTNAME; not the same thing. Let’s just throw that terminology out. The system-level binary name should never be capitalized in the tradition of Unix system namespace variables, but there’s nothing saying it can’t be. For that one, The JavaScript namespace should probably use the same standards for naming any part of the JS API, unless, like node, it follows the system-level convention, which as I already stated, is all lower-case. If we follow the JS API and make it “webby” it’s UpperCamelCase. Personally, as you'd be working from the command line with this and you need to separate the STDOUT and STDIN instances of The variable association is an important distinction not just as a matter of technicality and preference, but how it functions in the system environment. If you never leave the JS environment (think |
It's actually not a
|
I'm sorry for confusing anyone. Everywhere instead of "host variable" should be "host object". I'll change my previous comments but leave this one so @methodbox comment would not lose sense |
@ry it feels like we should either live with |
I agree with @kitsonk that EDIT: Oooops I see there are a lot of +1s for renaming to |
Again though |
Ok - sticking with Deno! |
In TypeScript/JavaScript in almost all conventions camelCase is used for variable names except of classes/constructors and only classes/constructors are named in PascalCase. So having
Deno
, the core object of the infrastructure in PascalCase is breaking the common convention for no reason. How about renaming it todeno
before it's not too late?The text was updated successfully, but these errors were encountered: