this post was submitted on 30 Nov 2024
57 points (79.4% liked)
Programmer Humor
19817 readers
136 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm aware of the increasing prevalence of JIT, that doesn't change the other markers I listed. Ironically though the language the post is about, CPython still lacks JIT. Also I disagree in general, there are things scripting languages can't do and will never be practical for. It's not that they aren't useful programming languages, that's not what I'm saying but I think having a separate category for them is useful.
So the only ways that the distribution mechanism matter are really a difference between How does the distribution mechanism matter beyond that? And even those points are
I'm assuming you are not saying "real" languages should be hard to write...
Objective-C and Go run slower than C and they're all compiled languages. Sure, an interpreter will be slower than a compiled language but modern languages aren't simply interpreted (i.e. JIT, etc).
There are dynamically typed compiled languages, and high level compiled languages.
Calling one class of languages "real" and another class something else is inherently demeaning. I wouldn't have cared enough to type this if you used "compiled vs scripting" instead of "real vs scripting". Though I disagree with using "scripting" at all to describe a language since that's an assertion of how you use the language, not of the language itself. "Interpreted" on the other hand is a descriptor of the language itself.
I personally can't stand Java because the language designers decided to remove 'dangerous' features like pointers and unsigned integers because apparently programmers are children who are incapable of handling the risk. On the other hand I love Go. It's high level enough to be enjoyable and easy to write, but if you want to get into the weeds you can.
Needing something installed is vague at best. If I ship python or Java with my program the user doesn't need it installed, if you compile a go or rust program the runtime is statically linked into the program, but it's still there. Additionally while decompiling to Java is trivial it doesn't change the fact that A) there is a compiler B) optimization can be done by the compiler C) compilers for other languages unrelated to Java can be built for the platform D) obfuscated bytecode can be structured in ways impossible to describe with Java source code because the JVM supports features the language does not(jumps, return type method overloading, etc)
Basically the JVM is a platform for running code, yes it has one flagship language and yes they influence each other but they're not exactly one in the same. A similar argument can be made for .NET.
I'm saying they're typically more difficult and have more rules, not that they should be "hard" per-say. I know somone who is a pretty capable lua programmer but gets lost in namespaces, classes, etc. Sure you can OOP in lua and Python but you don't strictly speaking have to. The only other language like that which comes to mind is C++ which has its own challenges. Go isn't OOP but go packages and the requirement for having a package is the kind of extra complexity I'm referring to. Scripting languages typically have a lower barrier to entry, that's all I'm saying.
Yes but also popular languages...I.e CPython and lua are still interpreted.
You're finding counter examples to all my points individually, I'm saying scripting languages usually share many of these traits, that's what makes them fundamentally good at scripting. You probably don't want a scripting language with boiler plate, that needs a compiler, that's statically typed etc. My points aren't traits unique to scripting languages, they're traits shared by basically all of them.
I'm using the language of the post, in real life when talking to people I just call them "scripting languages" or "programming languages" respectively and am hardly ever in a situation where further distinction is required. You're right that scripting language doesn't mean anything other than "good for scripting" but that comes with a bag of traits that make it GOOD for scripting. You don't want to script in C, Java, C#, C++, Go, Rust, etc because usually when people are scripting they want to write code fast, with less in their way, without a compiler, etc. Compiled vs interpreted is only one component of that categorization.
When I want to get something done that needs C I use C, when I want something fast and easy to write I use Java and then JNI with C if that's needed but honestly it better be a tiny amount of C or I'll go write the whole thing in C. And when I want to make a super short script to do things that scripting is good for I'll use bash or if I need something a bit more "real", to use that term again, I'll use lua. All languages have their place, they're just good at different things.