Some say that types are too much of an overhead for small programs but I find it impossible to reason about the design of software without types. I even opt for TS over JS for throwaways...
Buzz: A lightweight statically typed scripting language
31–40 of 91 posts
Re: Buzz: A lightweight statically typed scripting language
#32Yes! We're finally challenging the notion that scripting languages must inheritly be dynamically typed. Some say that types are too much of an overhead for small programs but I find it impossible to reason about the design of software without types. I even opt for TS over JS for throwaways...
Re: Buzz: A lightweight statically typed scripting language
#33Earlier quoted context omitted.
> actually unseat Python or bash or Lua These languages each have enough warts that lots of people and languages are chipping away at them. Go and Nim are doing the strong static typing that "feels like scripting" thing. Even Rust is making a bit of a dent, despite it being a systems language with memory semantics. There's plenty of room for all sorts of projects to try. Don't count anyone out. Even if the language n…
I don't know about Nim, but Go does not feel like scripting. It feels like C-style programming. Really old school and not good for scripting at all.
That said, Nim is actually designed to feel like a scripting language... for example, you don't write a main function at all, just code away (this is an actual hello world program in Nim):
echo "hello world"
So, out of statically typed languages, Nim is probably one of the best choices for scripts.Re: Buzz: A lightweight statically typed scripting language
#34What should I be looking for here that distinguishes it from other lightweight statically-typed scripting languages? Performance? Tooling? Particularly good FFI? There are some syntactic quirks that don't convey any obvious benefit, like the use of '>' to indicate a return type. Since this language uses C-style prefixed type identifiers, why not do that for functions as well? Alternately, why not use the much more co…
Re: Buzz: A lightweight statically typed scripting language
#35Yes! We're finally challenging the notion that scripting languages must inheritly be dynamically typed. Some say that types are too much of an overhead for small programs but I find it impossible to reason about the design of software without types. I even opt for TS over JS for throwaways...
There have been statically types scripting languages for ages. Embeddable ones, too. That's not new.
Re: Buzz: A lightweight statically typed scripting language
#36What should I be looking for here that distinguishes it from other lightweight statically-typed scripting languages? Performance? Tooling? Particularly good FFI? There are some syntactic quirks that don't convey any obvious benefit, like the use of '>' to indicate a return type. Since this language uses C-style prefixed type identifiers, why not do that for functions as well? Alternately, why not use the much more co…
Agreed. New languages should use similar conventions to popular existing languages, for the sake of familiarity, unless there are obvious benefits to doing something else.
> Similarly, I understand the mimetic quality of '[str]' for 'array of str'
It's quite Haskell-like.
> but '{str, int}' doesn't have the same ring since key/value pairs are separated by ':'.
Indeed. `{str:int}` would be better.
Re: Buzz: A lightweight statically typed scripting language
#37Re: Buzz: A lightweight statically typed scripting language
#38I admire people who make projects like this. But it is so alien to me to try making something like a language. What is the motivation, and the goal? Surely it is practically a one-in-a-million chance to actually unseat Python or bash or Lua. I could never really justify using something like Buzz in a professional setting, just because it is too obscure and new. And look - if it is just for the joy of it, I get it! Bu…
Re: Buzz: A lightweight statically typed scripting language
#39Earlier quoted context omitted.
Static typing is orthogonal to scripting or GC.
English is not my native language, and "orthogonal concepts" always mean something along the lines of "mutually exclusive" in my head.