Live data from Hacker News

Buzz: A lightweight statically typed scripting language

buzz-lang.dev

31–40 of 91 posts

Re: Buzz: A lightweight statically typed scripting language

#31
Yes! 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

#32
post #31

Yes! 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

#33
post #9

Earlier 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.

Completely agree... but when people like a language, they may still want to write scripts in it even though it may be really uncomfortable.

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

#34
post #3

What 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…

What would be the other lightweight statically typed scripting languages? There really aren't many.

Re: Buzz: A lightweight statically typed scripting language

#35
post #32
post #31

Yes! 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.

Any in particular that you're a fan of? (Genuinely curious)

Re: Buzz: A lightweight statically typed scripting language

#36
post #3

What 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…

> There are some syntactic quirks that don't convey any obvious benefit, like the use of '>' to indicate a return type. [...] why not use the much more common ':' or even '->'?

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

#38

I 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…

It’s surprisingly easy to write an interpreted language and I’d highly recommend it as a learning tool. You get a really good intuitive sense of how programming languages work by doing it.

Re: Buzz: A lightweight statically typed scripting language

#39

Earlier 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.

Not at all, it means independent from each other. Like the x and y coordinates of a point in a plane: you can set one of them to the value you want and it won't affect the other. This only happens when the x and y axes intersect at 90°, hence the "orthogonal".
Post reply on HN