1

There is this rising trend with web development of making new pseudo languages to extend the functionality of JavaScript, CSS and HTML given that those are static and their metamorphosis or evolution is painfully slow due to the variety of browser providers.

So I am currently having a concept dilema on how to categorize them for a book I was made to write by my employer as no one seems to have a name for these pseudo languages.

A tiny list of them :

  • JavaScript: LiveScript, Metalua, Uberscript, EmberScript.

  • HTML: Razor, Java Scriptlets.

  • CSS : LESS, Sass.

I believe the concept of these pseudo languages and a language or an extension of a language is quite different.

First these languages do not extend any functionality currently existing on HTML or CSS or JavaScript, they simply work around it.

And also they do not "compile" to an intermediate language, they are merely 1-1 translated to something that only then can be compiled.

What would you call them?

2
  • 2
    You seem to be under the mistaken impression that a language compiler that takes one language and spits out another is not in fact a compiler just because the language it spits out isn't machine language. What language is spit out doesn't change the fact that these languages are compiling down to a lower level language. They aren't "pseudo" languages, any more than Python is when people compile it to C. Also JavaScript is not generally compiled rather it's interpreted usually. Aug 21, 2014 at 15:24
  • Seriously? Someone made a language called LiveScript in the web context? How confusing is that? Aug 21, 2014 at 19:54

4 Answers 4

2

I usually see it called a transpiled language, but according to wikipedia, it's also called a source-to-source compiled language or a transcompiled language. They mainly differ from compilers in that the destination language is on the same level of abstraction as the source language, not like a high-level language to assembly.

1
6

There are two categories here: preprocessors and programming languages. The first is a subgroup of the second.

The fact that they are compiled, i.e. subject to a process which "transforms source code written in a programming language (the source language) into another computer language (the target language)" to a high-level language rather than Assembler doesn't make them "specific":

  • Some, like C, are compiled to Assembler,

  • Others, like C#, are compiled to IL,

  • Others, like LiveScript, are compiled to JavaScript.

2
  • 1
    Once upon a time C was considered high-level. Now? Most JavaScript might as well be archaic machine language to the many developers that rely entirely on JQuery.
    – Katana314
    Aug 21, 2014 at 15:30
  • Originally, C++ was compiled to C, not assembly. There's definite precedent for initially converting a new language to some existing one in order to more quickly get it out. If CoffeeScript took off, we could very well see direct CoffeeScript interpreters. Aug 21, 2014 at 20:00
5

They are languages. Period.

There is no such thing as a compiled language, interpreted language, or transpiled language. Languages aren't compiled, interpreted or transpiled. They just are. Compilation (transpilation is just compilation) and interpretation are traits of the compiler or interpreter (duh!), not the language. Every language can be implemented by a compiler, and every language can be implemented by an interpreter. Most languages have both compiled and interpreted implementations. For example, there are interpreters for C and C++, and there are compilers for Ruby, Python, PHP, ECMAScript, Perl and Lua. Many modern language implementations actually use both interpretation and compilation in the same implementation.

There are, for example, projects for implementing CoffeeScript on the Rubinius VM and the Parrot VM. And why not? CoffeeScript is a nice language on its own, why tie it to ECMAScript?

TypeScript is semantically and syntactically a superset of ECMAScript, but that doesn't mean that the only way to implement it is as a compiler to ECMAScript. You could just as easily write an interpreter, or a compiler to native code, or a compiler to CIL bytecode, or a compiler to JVM bytecode.

Dart has a compiler to ECMAScript, but it also has a very nice and very fast native VM.

-2

Derived Language or Extension Language appear to be common and well-fitting descriptors. From the Ember.js homepage:

EmberScript is a CoffeeScript derived language

and from the SASS homepage:

Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.

1
  • 1
    You are parsing the sentences wrong. "CofeeScript derived language" means "language that is derived from CoffeeScript" and "CSS extension language" means "language that extends CSS". The only word that can stand on it's own is language.
    – Jan Hudec
    Aug 21, 2014 at 15:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.