Hacker News new | ask | show | jobs
by jerf 1309 days ago
Curious what the author is thinking of when calling this a "scripting language"? I personally don't have much trouble imagining a strongly-typed scripting language, but that definitely goes against the flow of the past couple of decades. Is it that it is garbage collected? That's about all I can see that would make this immediately obviously a "scripting language". It doesn't seem like it ought to be intrinsically as slow as what usually gets called a "scripting language".

To be clear, this is an honest question, and possibly something the author should consider answering, intended as feedback, not a criticism. I'm open to it. I'm also curious and I'm sure I'm not the only one. (Either way I definitely would suggest mentioning if it's garbage collected or not. It's an important point.)

4 comments

Author here. A few points make buzz a “scripting language” in my view: - runs in a VM - garbage collected - high level - “simple” meaning there’s only a handful of concepts to understand to use it

It’s true that we’re not used to scripting languages having a type system. But its a trend that is catching on: python has types, php too and typescript is at its peak in popularity to name a few.

Actually what made me not consider this a "real" scripting language is not any of those things but rather the existence of a non-optional entry point function. Scripting languages typically read code from top of file to bottom to decide what to execute
It’s really hard (impossible?) to have a type system with user defined types and do without a declarative top level.
I think by the non-soft bits (I don't know what simple means) of your definition, Erlang, java, c#, go would be considered "scripting languages", which I think would be a hard sell.

Anyways I don't mean to take away from your work;. It looks very cool.

Multiple passes?
I don’t want to be that person but technically python is a strongly typed scripting language as it has no type coercion but instead uses structural typing.
You might be thinking about the distinction between statically typed and dynamically typed languages. There are plenty of strongly typed scripting languages. Python is strongly typed; JavaScript is weakly typed.
Reading this comment, I realized I always thought:

Scripting == interpreted

Is that not the case?

In my mind scripting means what it is: You read a file like a script from top to bottom and run it. Declarations are actually instructions for a "declarer routine". There's usually no predefined entry point function, and if there is one it's optional.

Compiled/interpreted is kind of besides the point.

Julia (compiled, btw), ruby, python, php, perl, bash, JavaScript thus are all scripting languages.

Java, c, c#, go, f# rust, zig, Erlang, some flavors of lisp, node-style javascript, are not.

There are some corner cases. I consider elixir, for example to be a scripting language for it's own compiler which produces a very much non-scripted result.