Note that there are some explanatory texts on larger screens.

plurals
  1. POwhat would be the impediments to creating an "Europanto" type universal scripting language?
    text
    copied!<p>After switching back and forth between several scripting languages this week, I found myself thinking how similar they all are. Yet I'm always reaching for Google (or nowadays SO) to remember details like what the local equivalents of "instanceof" and "endswith" are, or the right syntax to declare an interface, or whatever.</p> <p>This reminded me of the (human) language <a href="http://en.wikipedia.org/wiki/Europanto" rel="nofollow noreferrer">Europonto</a>. Just pick some vaguely English syntax and some vaguely Romance/Germanic/Slavic vocabulary, and it's all good!</p> <p>So what would happen if we tried to do the same thing with a scripting language. In the mood for Python-style indented blocks today? Fine! Want to use a prototype object? Ok! Can only remember how to spell the PHP names of some library function? No problem!</p> <p>Anyway, that's the wild and crazy idea. Since we need a question that admits concrete answers, let's tighten it up like this:</p> <p>What would be the most significant conflicts in creating a scripting language that permitted all the native syntax and library functions of [Python, Ruby, PHP, Perl, shell, and JavaScript], such that you could freely intermix code blocks and function names between languages?</p> <p>And let's say that any particular construction should be consistent at the statement level. So we'll allow:</p> <pre><code>foreach( $foo as $bar ) { if $foo == 2: print "hi" } </code></pre> <p>but not, say,</p> <pre><code>foreach( $foo as $bar ) { if $foo == 2: print "hi" endif end </code></pre> <p>Conflicts can include: parser ambiguities; name collision; conflicting semantics for objects or functions or closures; etc. I'm guessing that scope will be a ginormous issue, but you tell me.</p> <p>I'll start this as "community wiki" from the get go, so if you think it's a fun question but want to make it more rigorous, feel free to edit.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload