Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

scripting language to me has a definition. Maybe I made it up but my definition includes "runs immediately". So, basically, any language who's most common usage is either via "#!/bin/path-to-interpreter" or "interpreter script" or register some extension ".bat" in DOS/Windows

This fits python, perl, sh, node

It does not fit C/C++/C#/F#/Java?/Go/Swift/Typescript. Those are 2 steps at least. One to compile which generates an executable. Another to run the executable.

But I'll acknowledge I made up that definition. No idea of others agree. I get that it's arbitrary. I could certainly make something that given "#!/bin/execute-c-as-script" takes the .c file, compiles it to some temporary place and runs it. But that's not "most common usage" so I'll stick to my point as part of the definition of scripting languages. For me, if it's most common to have a manual compile step separate from a run step then it's not a scripting language.



It's basically meaningless when you try to line languages up with that sort of criterion.

Go compiles fast enough that you can use it with a wrapper "interpreter": https://github.com/erning/gorun So does C: https://github.com/ryanmjacobs/c So does Haskell: https://stackoverflow.com/a/8676377 So does f#, via `#!/usr/bin/env fsharpi --exec` I think

You can compile python: https://github.com/dropbox/pyston You can compile JS: http://enclosejs.com/ I wouldn't be surprised if someone found a way to AOT-compile bash, but I'm not going to bother looking for that.

The only criterion I've found which makes some sort of sense is whether the language designers consider "scripting" a use case to actively support and use to drive language features, or if it's a second-class citizen.


You seem to have ignored "most common usage". None of your examples are "most common usage"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: