For instance, just for kicks, I was thinking about having a PHP script that all of my JavaScript files would pass through; now, this combined with the lovely little buggers that are regular expressions leads to a whole world of possibilities (for better or worse). At the moment, I've only made it so that JavaScript is Pythonic in structure, like so:
A simple function which takes a parameter and displays the number if it is a multiple of 2 and/or 3:
<script>
function show_mults_23(k):
for (x = 0; x < k; x++):
if (x % 2 == 0):
document.body.innerHTML += x;
document.body.innerHTML += ' is a multiple of 2.<br/ >';
if (x % 3 == 0):
document.body.innerHTML += x;
document.body.innerHTML += ' is a multiple of 3.<br />';
</script>
It's purdy, huh? ; p
Seriously, though, I'm curious as to whether or not such a concept has ever been implemented in a development environment. There's obviously a tremendous decline in speed, but aside from that, could such an idea have any ground?