4 ms·
Well, who said that scripting language cannot be compiled? And yeah, Clang-REPL is another way to make it REPL-friendly.
by aartaka 2y ago
Well, who said that scripting language cannot be compiled? And yeah, Clang-REPL is another way to make it REPL-friendly.
- knome 2y agogenerally they aren't, as scripting usually implies an interpreter, though no one is stopping you from using a wrapping script that quietly compiles on first run and caches a bunch of executables somewhere. not much different than python producing bytecode files as it goes along.
- randomdata 2y agoScript usually implies some kind of task that runs once and the exits. As opposed to a system that is expected to run indefinitely. There are good reasons for why scripts are often interpreted and why systems are often compiled, but that's not what defines them. There are definitely scripts that are compiled and systems that are interpreted out in the wild.
- knome 2y ago'scripting' is an ill-defined term with many interpretations, certainly.
- randomdata 2y agoIf that is the case, pick another interpretation and describe to us what "non-scripting" then might be.
- knome 2y agothe original definition is likely tossing shell commands in a file to run later. chaining commands together. since perl and python supplanted this, they get lumped in as 'scripting languages'. both certainly can be used to write long running systems or short one off tasks. compiled languages are rarely used for one offs because the effort they require is usually greater than the task calls for. a big part of perl/python use is in tying together libraries written in more difficult lower level compiled languages. you'll also see scripting used to refer to languages embedded in larger projects. lua scripts to control entities in a game, for instance. do they compile these somehow? I never did in the little project I used lua for. ---- all of that together, I expect that scripting as a concept largely boils down to conceptually simpler languages with less view of the ugly underbelly of how things actually work in a computer, used to chain together abstractions created by lower level code. scripting is duct-tape. whether you duct-tape together a one-off task or some wad of long running functionality is besides the point.
- randomdata 2y ago> you'll also see scripting used to refer to languages embedded in larger projects. Yes, but this is conceptually exactly the same as the aforementioned shell scenario. This is not something different. Just as I suspected, there is only one definition, and one that has proven to actually be well defined to boot as you managed to reiterate the only definition I have ever known to perfection.
- bityard 2y agoSure, there is no "rule" against it. But words/phrases have commonly-accepted meanings and willfully ignoring or appropriating those meanings implies either cultural ignorance or a concealed agenda. If you want to insist that scripting languages can be either compiled or interpreted, then its better to just drop it altogether and just say "language" because the "scripting" part has utterly lost its identity at that point.