> Objects, list and maps variables are only reference to them. Meaning you can't assign a new list to a constant variable but you can modify the list itself. In what contexts is this useful? I know it matches some other languages view of `constant`, but I feel that this sort of behaviour is very surprising to a user. Assuming the following code: object Person { str name = "Joe", | Fields can have default values int a…
I guess this works like the Javascript `const` keyword.
Buzz: A lightweight statically typed scripting language
21–30 of 91 posts
Re: Buzz: A lightweight statically typed scripting language
#22This comment section is very "why write a Language?" oriented. I love reading about new languages!! I work with data scientists a lot so I'll probably always use Python professionally, at least for the foreseeable future. But Python, JavaScript etc are huge languages with massive histories of practical trade offs and compromises. It's always exciting to see what someone's dream language looks like! Besides, learning…
Re: Buzz: A lightweight statically typed scripting language
#23Earlier quoted context omitted.
I guess this works like the Javascript `const` keyword.
Java too. Rust is the only language I’ve used where “immutable” means everything through the whole reference tree is also immutable. Well, only language that allows mutation at all.
JavaScript probably behaves like that because `const` was tacked on (and it's dynamically typed so there's no place to mark parameters as const). There is Object.freeze() which sort of makes something immutable, but it's not really the same.
Java doesn't even have const so I guess they just didn't care about const correctness or didn't have time to add it.
Re: Buzz: A lightweight statically typed scripting language
#24Not explicitly mentioned in the guide, but Buzz has a garbage collector [1] (can also be inferred via a casual mention of upvalues). So it has more focus on scripting than static typing I guess, but the language design doesn't look so to me. [1] https://buzz-lang.dev/reference/std/gc.html
Re: Buzz: A lightweight statically typed scripting language
#25This comment section is very "why write a Language?" oriented. I love reading about new languages!! I work with data scientists a lot so I'll probably always use Python professionally, at least for the foreseeable future. But Python, JavaScript etc are huge languages with massive histories of practical trade offs and compromises. It's always exciting to see what someone's dream language looks like! Besides, learning…
Re: Buzz: A lightweight statically typed scripting language
#26I 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…
> 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…
Re: Buzz: A lightweight statically typed scripting language
#27Not explicitly mentioned in the guide, but Buzz has a garbage collector [1] (can also be inferred via a casual mention of upvalues). So it has more focus on scripting than static typing I guess, but the language design doesn't look so to me. [1] https://buzz-lang.dev/reference/std/gc.html
Static typing is orthogonal to scripting or GC.
Re: Buzz: A lightweight statically typed scripting language
#28Earlier quoted context omitted.
Java too. Rust is the only language I’ve used where “immutable” means everything through the whole reference tree is also immutable. Well, only language that allows mutation at all.
And C/C++. Probably other value based languages like Go and Zig. JavaScript probably behaves like that because `const` was tacked on (and it's dynamically typed so there's no place to mark parameters as const). There is Object.freeze() which sort of makes something immutable, but it's not really the same. Java doesn't even have const so I guess they just didn't care about const correctness or didn't have time to add…
Re: Buzz: A lightweight statically typed scripting language
#29I 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…
> 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…
Re: Buzz: A lightweight statically typed scripting language
#30Earlier 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.