Probably it has more to do with the misuse of the word “coding”. Technically inform files are not code, they are script. If inform emits a C program file for a C compiler then that is code and not script. Code is anything that compiles down and runs as a portable executable. Script are instructions that are interpreted and run inside a portable executable and interface with the executable. It is why HTML/CSS/JavaScript/TypeScript are not technically code, they are script. They are instructions for a browser.
This is a ridiculous distinction. Code or script or whatever you want to call it, it’s instructions for the computer at the end of the day. Whether it’s compiled down to byte code or on the fly as it’s executed doesn’t make any difference. It’s coding either way.
Not to a software engineer. The distinction is technically important. You’ll find such strata in other professions as well. You don’t have to agree with it. For example the “script” in JavaScript means something. It is different from Java which is a compiled language.
The distinction may be important in some cases, but not in the simple matter of “what is coding”. Scripting is coding. Full stop.
Scripting is scripting
Yes. And scripting is coding. Don’t try to argue it. You’re writing instructions for the computer. It’s coding.
Scripting is writing instructions for the interpreter.
The interpreter is running on the computer, so instructions for the interpreter are instructions for the computer. It’s coding.
I remember browsing some book in the gift shop of some art museum, in defense of modern art; explaining why the “serious” art which had been selected for display in art museums is different from the art which children produce.
I do appreciate some modern art, even some modern art that I judge could have been produced by a child. But I was not especially swayed by the apologetics presented in the book.
“Yes it is” “No it isn’t” “Yes it is”… isn’t really productive discussion or debate. Please discuss the topic and agree to disagree on minor syntactical arguments, or start a new thread or private message on “what is coding vs scripting” if it’s an truly an important debate someone wants to have. Ignoring or muting the thread is also an option if the discussion is not relevant to you.
[!edit]Ah, I see we’re in a new thread now, the previous post isn’t a non-sequitur at all [he annotated for the future alien archive researchers who are trying to figure this all out.]
Honestly, I find the scripting versus coding debate pedantic and I say that as someone with a Computer Science degree… I also find the fine art versus non-Fine art debate pretentious on the part of the people who put fine art on a pedestal.
And while I can agree there’s a certain artistry to writing code that is both efficient and easy to read and understand, nothing wrong with just wanting code that gets the job done. You can have a hammer with an intricately carved handle and finely forged embellishments on the head that is as much a work of art as it is a practical tool, but nothing wrong with a hammer with a plain, wooden dowel for a handle and a boring, metal cylinder for a head.
Not everyone cares about the artistry of something, and honestly, that’s fine and the people who do care about the artistry should be free to ignore those who don’t and vice versa.
Java compiles to bytecode for a virtual machine; Inform compiles to bytecode for a virtual machine. Why does bytecode for the JVM count as “compiling” but bytecode for the Z-machine not?
I don’t think “it’s only coding if it outputs machine code for the actual hardware” is a useful distinction nowadays, with how many layers of indirection just about every platform uses. Is the Commodore 64 Å-machine interpreter “scripting”, even though it’s written in 6502 assembly, because I don’t have a C64 and only test the code in an emulator?
And even if hardware implementing that virtual machine doesn’t exist, it’s probably theoretically possible for it to exist. (I’m not completely certain about this, mind you.)
Lua and Python also compile down to bytecode for a virtual machine. Same for Unreal Engine blueprints and many other things. I’m not sure whether JavaScript is normally compiled down to bytecode like this, but it could be, at least.
There are still languages that never hit bytecode, like shell scripts (bash, batch, etc), but even then I would consider it coding to write in those languages. They could theoretically be compiled into bytecode if you really wanted to.
Besides which, emulators exist, completely erasing the distinction. Just like you said yourself. Is compiling code down to 6502 or M68k bytecode to run on an emulator considered to be scripting now?
That’s a ridiculous distinction and not one I’ve heard in software engineering circles (of which I’ve spent my fair share of time). Many interpreted languages like C# and Java would be script under your definition because they run as bytecode under a vm. The distinction is further muddied by just in time compilation not just of those languages, but of things like javascript. “Portable executable” is likewise meaningless. Portable across what? Cpu architectures? The only common usage of that term essentially just means “windows executable”. What about FPGA implementations of environments that would otherwise be software based interpreters?
Code vs script is a spectrum (a nebulous one at that), not the cut-and-dried distinction you claim. Regardless of definitions the distinction is one without a difference - both use symbolic languages to represent a set of behavior that is carried out by an interpreter or other software/hardware. Scripting is coding and vice versa.
“There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy.”
Agreed. Coding can definitely be a creative exercise, but a lot of it just…isn’t.
(Unless you also consider running new plumbing for your house a creative exercise)
It’s even worse than that: nearly all CPUs since the 1970s implement their instruction set at least partially in microcode, so even a compiler that emits pure x64 machine code is (in some sense of the word) targeting an interpreted VM. It’s just layers all the way down.
It’s just layers turtles all the way down.
FTFY
Seriously though, I agree. Likewise, if I run an OS under an emulated VM process vs hardware virtualization, then all that code becomes script…magically.
It’s all just logic and anything that can be done in software can be done in hardware and vice versa.
Right! If someone really wanted to make hardware that implements the Java VM or the Python VM or the Lua VM, they probably could. right? No-one has any reason to do it so it’s not done, but it should be theoretically possible.
Sure. There are people who’ve taken emulators for real software-running hardware then turned around and written that emulator into an FPGA. Where on the spectrum do those programs fall? Shrödinger’s code? ![]()
Beyond that you can embed "scripts’ into an existing executable engine as a resource, or even dynamically translate it into something else. Software-based plugin architectures for any number of things muddies the distinction even further.
As I see it, in practice “coding” is a broad term that applies to any sort of programming (regardless of whether it’s compiled or interpreted), while “scripting” is a subset of coding which refers to making smaller programs that aren’t really intended as a standalone, polished piece of software. There is no single characteristic that defines scripting, only a collection of “family resemblances” that make it usable as a term without a hard-line fixed definition.
Some of the features that potentially make something resemble a “script” include:
- relatively small (often a single file)
- written in a high-level, interpreted language
- meant to modify the behaviour of a larger software product (e.g. a mod/extension) or serve as part of a pipeline that strings together multiple tools (e.g. build scripts)
- primarily written to directly solve a problem faced by the author of the script, with any sharing or general distribution being an afterthought
- not distributed as a standalone commercial product
It’s a term that serves a useful purpose, but not an “important distinction” that “matters” in a significant way.