4 ms·
I love the idea of a statically typed scripting language! Overall it seems pretty cool. Really the biggest distraction is that the static typing is lost betwee
by andyferris 4y ago
I love the idea of a statically typed scripting language! Overall it seems pretty cool.
Really the biggest distraction is that the static typing is lost between int and float with the catch-all num type. I think this will make it harder to program in, not easier (reasoning about where NaN, Inf, under/overflow, rounding etc might occur will depend on some choice it makes internally so as a programmer may need to give up and “assume the worst” everywhere!)
You can still keep it nice and easy and scripty with literals like 1 vs 1.0, and not worrying about number types other than signed Int64 and Float64.
- ninjabeans 4y agoIs there any difference between a statically typed scripting language and a statically typed compiled language that compiles in <.1s?
- yakubin 4y agoVersatility of the standard library and ability to write terse programs which achieve a lot. Even if C++ compiled always in under 0.1s, I wouldn’t call it a scripting language, because its standard library is anemic and basic stuff, like finding things in containers, copying things from one container to another, basically anything involving iterators requires such elaborate code that it’s on the opposite side of the spectrum from a scripting language. A scripting language is a tool for quickly performing one-off tasks. Terseness and a rich stdlib are virtues here.
- Deukhoofd 4y agoA scripting language and a compiled language are not two distinct things. A scripting language can be compiled if so desired, and JavaScript does so in most browsers for example. The main difference between a scripting language and a non-scripting language in my opinion is that a scripting language is called through a host program, which offers configuration and a standard library, while a non-scripting language runs by itself, using the operating system as its environment.