What is an extensible language?

6

I have found some extensible language definitions, extensible language , in which it is defined as a language that the programmer can modify. However, I did not quite understand how this can be done. Is it something related to syntax change? Or something related to creating extensions to other languages?

What is an extensible language? Can you give an example?

    
asked by anonymous 03.04.2017 / 22:21

2 answers

5

Programming language

Each has to define what it means by that. But overall I'd say create a new syntax, usually through metaprogramming .

Mechanisms can be simpler, from the C preprocessor to Highly sophisticated macros that can even wrap compiler .

It is very common for these languages to be appropriate for DSLs . An example .

In general this is very problematic and usually pees in the hand of someone who is not very good at dealing with all complexity. Programming language explodes in possibilities of combinations. Since "small" I wanted to make such a language, today I know how this is almost unviable for a product that goes beyond a very specific niche or academic research.

Some languages force the bar saying that they are extensible because it can extend something, but little.

Wikipedia .

Declarative language

There are declarative languages that are already DSLs that allow the creation of new declarations in a simple way. Although some of them are extensible by definition, I have not seen anything official indicating that they are considered "extensible languages", so although the term fits, it is used in a different context.

    
03.04.2017 / 22:40
3

I think one cool way to explain it is xml - eXtensible Markup Language - or Extensible Markup Language.

  

XML language is classified as extensible because it allows you to define   the marking elements.

ie inside the xml you can create your own tags type < book > < / book >

at a glance Extensive languages are :

  

Programming languages that allow the addition or change of   syntactic constructs or the association of new syntactic with   semantic or
New notations or operations, structures   new or modified control systems, or even   even elements from   different programming paradigms

You can create several ways to solve your problem, or use standard forms ... you have the freedom to create and impose your own format ... generally strongly typed languages have a certain difficulty in being extensible ... like name says the type will already be defined ... it is complicated to change it ...

there are cases that even in java (which is an extremely typed language) such as in this example , in case he created his own method for reading, it is a type of "extensibility" however in fact it is an exception since it needed a great adaptation

    
03.04.2017 / 22:49