Love it! The only thing that was a “meh” for me was using pipe for comments. It’s the only thing that I found to be unintuitive, which I very much like to see whenever I’m looking at a new language.
Show HN: Buzz, strongly typed scripting language written in Zig
11–20 of 70 posts
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#12Maybe I'm just old, but first thing I would look for in a strongly typed language is int vs float, but all I see here is num. Is a single numeric type expected for modern languages?
I'm not excluding the idea to allow the user to choose between the two. But the language must remain simple and relatively high level so I'm wary of going down that road.
Python, Ruby, or Lua do that. That's less "nonsense" than doing the same but hiding it from the user.
"num" also gives a false impression: before checking, I expected JS's (or Lua An alternative if you want
> simple and relatively high level
is to use decimals, at the cost of complicating the implementation.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#13Love it! The only thing that was a “meh” for me was using pipe for comments. It’s the only thing that I found to be unintuitive, which I very much like to see whenever I’m looking at a new language.
Do any other languages use it for comments?
#|
This is a multi-line comment
#|
And they can be nested because this is really just a reader macro
|#
|#
I don't think I've ever seen a standalone | for comments, especially since it's so often used as bitwise or logical or.And here they use \ for bitwise or, and the word `or` for logical or.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#14Maybe I'm just old, but first thing I would look for in a strongly typed language is int vs float, but all I see here is num. Is a single numeric type expected for modern languages?
I'm not excluding the idea to allow the user to choose between the two. But the language must remain simple and relatively high level so I'm wary of going down that road.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#15Earlier quoted context omitted.
I'm not excluding the idea to allow the user to choose between the two. But the language must remain simple and relatively high level so I'm wary of going down that road.
Segmenting the two and performing conversions implicitly as necessary is fairly standard, the only thing that would be required is... exposing the current implicit behaviour. Python, Ruby, or Lua do that. That's less "nonsense" than doing the same but hiding it from the user. "num" also gives a false impression: before checking, I expected JS's (or Lua An alternative if you want > simple and relatively high level is…
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#16just for your information: the logo resembles islamic flags
I disagree, they usually have green or black. I don't recollect them using stars either.
The logo is black, which seems to qualify as "green or black"?
Red and white are also very common (ottoman flag, turkey, tunisia).
> I don't recollect them using stars either.
"Star and crescent" has been common muslim iconography since the 14th century, and the ottoman empire (which introduced them).
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#17Earlier quoted context omitted.
Segmenting the two and performing conversions implicitly as necessary is fairly standard, the only thing that would be required is... exposing the current implicit behaviour. Python, Ruby, or Lua do that. That's less "nonsense" than doing the same but hiding it from the user. "num" also gives a false impression: before checking, I expected JS's (or Lua An alternative if you want > simple and relatively high level is…
Exposing how? If you mean documentation, Buzz as not yet its reference manual but it'll definitely be there.
No I mean as an actual type, instead of `num` juggling representation internally.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#18Earlier quoted context omitted.
Segmenting the two and performing conversions implicitly as necessary is fairly standard, the only thing that would be required is... exposing the current implicit behaviour. Python, Ruby, or Lua do that. That's less "nonsense" than doing the same but hiding it from the user. "num" also gives a false impression: before checking, I expected JS's (or Lua An alternative if you want > simple and relatively high level is…
Exposing how? If you mean documentation, Buzz as not yet its reference manual but it'll definitely be there.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#19Earlier quoted context omitted.
I think it's more to do with it being a scripting language. Scripting languages are designed to be quick and easy to write, so instead of having to deal with int/float etc, the language can do it for you.
Makes sense, and I guess it’s semantics, but if the language/interpreter is handling which numeric types to use for me, should it really be sold as “strongly typed” in the main tagline for the language? Internally, float and int are completely different types, 2’s compliment vs ieee754. Conglomerating them to a “number” feels like weak typing. (Disclaimer: I’m a grumpy C++ engineer.) Edit: it does look like a neat/us…
The problem I do see with combining int and float is that it means that you always have to be careful with == on any pair of numbers, where a language that does distinguish between the two gives you a clue about when equality will work and when it won't.
But that's a flaw in the number type, not a weakness in the type system.
Re: Show HN: Buzz, strongly typed scripting language written in Zig
#20Earlier quoted context omitted.
I think it's more to do with it being a scripting language. Scripting languages are designed to be quick and easy to write, so instead of having to deal with int/float etc, the language can do it for you.
Makes sense, and I guess it’s semantics, but if the language/interpreter is handling which numeric types to use for me, should it really be sold as “strongly typed” in the main tagline for the language? Internally, float and int are completely different types, 2’s compliment vs ieee754. Conglomerating them to a “number” feels like weak typing. (Disclaimer: I’m a grumpy C++ engineer.) Edit: it does look like a neat/us…