Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 17, 2021 11:18 pm GMT

Rant on JS naming

What bothers me about JS is the way packages and tools are named.

This post is inspired by this post.

I don't like the naming with an extension.

Like "Node.js".

It is not the name of a file.

Similally, react.js, vue.js, next.js... are not the names of files. Well maybe sometimes, as a compiled result, but not in the source code and it usually it is vue-1.2.3-esm.js or whatever as a long name anyway.

So why add extension? And not use it consistently?

You don't have to tell people the name of your language in your runtime or package name. Who doesn't know what Node or React are in JS or might confuse them with something else of JS if ".js" was omitted?

We don't call it "pandas.py", "requests.py", "grails.jar" or "rails.rb" (say that out loud!) in other languages. Yes, Python packages have Py names sometimes like Pygame or Numpy, but that is fun and artistic and doesn't go to extension level convention.

And Node and Node.js and NodeJS are all (sort of) correct spellings. Things diverge in the JS community, rather than converge (e.g. JavaScript, ECMAScript and EMScript are all the same thing and ES6 and ES2015 are the same thing).

And some say "Node dot JS" aloud, which is annoying. It sounded so verbose on NextConf for the presenters to say Next dot JS all the time when it is clear from the context and "Next" would be fine.

Typing "next.js" is the most common way for packages while "DocsifyJS" is the preferred way of some packages like in Docsify docs.

Anyway, that has been bothering me a while and wanted to vent about inconsistencies in the language we love to hate but can't do without (yet).


Original Link: https://dev.to/michaelcurrin/rant-on-js-naming-hnn

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To