Coffeehouse Thread

101 posts

JavaScript - What's in a name?

Back to Forum: Coffeehouse
  • User profile image
    Charles

    [The idea of renaming JavaScript came up briefly in the MIX11 JavaScript panel. I want to extend the conversation here]

    JavaScript is neither Java (not related to Java in any tangible way) and it’s no longer a scripting language (it’s interpreted and compiled, runs both in and outside of browser hosts, on clients and in the cloud, can be used to do almost anything in user mode).

    If you could rename JavaScript to something that better reflects what the language is, then what would it be?

    C

  • User profile image
    magicalclick

    Java#. I forgot what it is, but, I recall it is capable of doing ref or putting function in an array. I am not sure which one, I cannot remember correctly. But, I like JavaScript than Java because it is less limited in comparison.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    cbae

    JNJ - Acronym for "JavaScript's not Java" or recursive acronym for "JNJ's not Java"

     

  • User profile image
    Bass

    BassLang

  • User profile image
    itsnotabug

    i like 'ec'.

    homage to it's official pedigree (ecmascript) + play on words 'easy',

  • User profile image
    evildictait​or

    ECMAScript

    ECMAScript is official name of javascript, since javascript implies a reliance on java which is proprietary and trademarked by a big evil corporation (namely Oracle, formerly Sun). The implementations of javascript in every browser other than Microsoft's is called ECMAScript, but they all maintain backwards compatability for the script tag's language="javascript" because to not do so would be to break every website in the world.

    Also, no offense Charles, but Javascript isn't compiled and it is still a scripting language. It'll only "upgrade" to a compiled language if you distribute byte-code. How the script behaves in the engine (e.g. interpreted with a while-loop or JITted to native code) is an implementation feature, not an architectural difference. IE9 JITs javascript because it's faster to do so, not because javascript has changed.

  • User profile image
    Bass

    , evildictait​or wrote

    ECMAScript (which is actually the real name of javascript - because Java is trademarked and javascript has nothing to do with java. ECMAScript defines the standard).

    Also, no offense Charles, but Javascript isn't compiled and it is still a scripting language. It'll only "upgrade" to a compiled language if you distribute byte-code. How the script behaves in the engine (e.g. interpreted with a while-loop or JITted to native code) is an implementation feature, not an architectural difference. IE9 JITs javascript because it's faster to do so, not because javascript has changed.

    Well you go into the territory of "what defines a scripting language", and I don't think that's something that has ever been uncontroversially defined. I do recall witnessing very large flamewars starting over this topic.

  • User profile image
    evildictait​or

    Well you go into the territory of "what defines a scripting language", and I don't think that's something that has ever been uncontroversially defined. I do recall witnessing very large flamewars starting over this topic.

    To me a scripting language is anything which you deliver to your audience as code rather than as binary data. There's clearly a spectrum where a binary assembled x86 blob is clearly "compiled" all the way up to things like LUA which are clearly scripted, but a language doesn't change designation just because a particular engine for it changes something under the hood that doesn't require anyone before them in the coding-chain to do anything different.

  • User profile image
    Charles

    @evildictaitor: I agree and disagree. Also, no offense taken... JS is a general purpose, object oriented, functional, imperative, dynamic programming language. It isn't a scripting language at all. I can't agree with you that it is. That said, ECMAScript is the not only the worse name ever, but it's wrong. JS is not a scripting language. Smiley

    C

  • User profile image
    Bass

    , evildictait​or wrote

    *snip*

    To me a scripting language is anything which you deliver to your audience as code rather than as binary data. There's clearly a spectrum where a binary assembled x86 blob is clearly "compiled" all the way up to things like LUA which are clearly scripted, but a language doesn't change designation just because a particular engine for it changes something under the hood that doesn't require anyone before them in the coding-chain to do anything different.

    Even if everyone agreed to your definition, where does that put C# then? Or Microsoft's F# shell? Are these languages scripting languages because they don't require an explicit compilation step? ActionScript is actually compiled to a byte code before deployment, despite having "Script" in it's name, is it a scripting language?

    To me the whole separation between "scripting" and "non-scripting" languages is a useless distinction that literally says nothing useful about the language because people can not agree on what constitutes a scripting language to begin with. If we can get rid of this adjective from the computing vernacular, the better communication will be.

    I prefer adjectives like Charles "general purpose, object oriented, functional, imperative, dynamic", because they aren't nearly as ambiguous.

  • User profile image
    contextfree`

    @Charles: Microsoft should rename their JS implementation (back?) to LiveScript. It would both be retro-cool AND tie in with their Windows Live brand. Tongue Out

  • User profile image
    DeathBy​VisualStudio

    FMe#

    If we all believed in unicorns and fairies the world would be a better place.
    Last modified
  • User profile image
    AndyC

    , evildictait​or wrote

    ECMAScript is official name of javascript, since javascript implies a reliance on java which is proprietary and trademarked by a big evil corporation (namely Oracle, formerly Sun). The implementations of javascript in every browser other than Microsoft's is called ECMAScript, but they all maintain backwards compatability for the script tag's language="javascript" because to not do so would be to break every website in the world.

    Well Mozilla still call it Javascript, Microsoft used to call their version JScript but now seem to confusingly alternate between Javascript and ECMAscript depending upon the phase of the moon. In any case both of them are poor names, ECMAscript sounds more like a disease and Javascript has been eternally confused with Java.

    I'd also agree with those who say it's no longer a scripting language. Not because of whether it is or isn't compiled, but because a scripting language (to me) is something that is basically used as glue logic between predefined components principally written in other languages. "Javascript" has gone well beyond that and now we see whole applications written in it.

    I'd call it Bob, but that's probably because I'm not a language designer.

  • User profile image
    Geoffreyk

    Nirvana

  • User profile image
    Blue Ink

    @Charles: while I agree that the "Java" prefix is a misnomer, I am not sure that there is a similarly strong argument against "Script". Websites still serve pure source code and it's up to the client software to decide how to execute it and that sounds like an implementation detail to me (off a tangent, I believe that Chakra only fully compiles scripts when it deems it worthwhile... not sure if that information is still current, though).

    Anyway, abiding to your rules, I would probably go with a name like "Enabler"... both meanings seem to fit.

    EDIT: missed a beat and lost the discussion above. Sorry about that. It's indeed a thin line, but I think that the mark of a scripting language is how it is used... and most JS code in the wild is script-ish in nature (and often enough the result of some hurried copy & paste).

  • User profile image
    evildictait​or

    @Bass: So far as I'm concerned, Java and .NET and ActionScript are compiled languages because they ship bytecode rather than source code, although I'll agree you get into shades of gray. Is compressed javascript a bizzare form of bytecode? or given that you can disassemble .NET and pull out metadata like method names proof that a .NET exe is actually bizzarely compressed source code? What about PHP - normally it's completely interpreted, but with ZendOptimiser you can distribute bytecode to run on the server, and with NGen and PowerShell you can say that C# spans the whole spectrum - from a completely native binary that runs on the bare processor all the way to a script interpreted at runtime.

    Life's not as easy as it used to be, where bash scripts and python were scripting languages and anything with a .dll or .exe extention was compiled. We live in shades of gray.

    This being said, javascript is sent directly from the original notepad of the author complete with comments to the end-user's browser. It is not pre-optimised, compressed or stipped of comments and symbols, and is entirely textual. I therefore stick by my original assertion that javascript is a scripting language in the sense that the script (latin for "writing") of the author is sent to the browser at the time the script is to be run.

  • User profile image
    Charles

    , Geoffreyk wrote

    Nirvana

    I really like this!
    C

  • User profile image
    Charles

    @Blue Ink: There are no rules. Mine was just a question based on a few assumptions I believe to be correct (JS is not at all related to Java and today it is used in a much more robust way than scripting, regardless of the fact that JS source code is sent to client consumers in text format for analysis, interpretation, compilation and execution - or not.... node.js is an example of using JS to build web servers...).

    With respect to the client... In fact, the behavior of sending source code to some runtime system (like a browser) is what the web is all about, really. HTML, CSS, JS - it's all just text which eventually ends up running in the native realm...

    Web browsers are just integrated runtime environments composed of parsers, interpreters, compilers, JITers, layout engines, etc, etc, etc... The fact that you feed this computational system text in real time from arbitrary sources on the Internet is rather beautiful and scary at the same time.  None of this means that JS is a scripting language because it gets interpreted or compiled or, like all major JS engines, both, just after downloading into the browser VM (a browser is also a VM).

    C

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.