Live data from Hacker News

Show HN: Buzz, strongly typed scripting language written in Zig

github.com

1–10 of 70 posts

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#4

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

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#6

Maybe 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?

> Numbers are either internally i64 or f64 and are coerced from one to the other as needed

I agree, not quite my preference in scripting languages. I prefer to be able to deal with numeric representation.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#7

Maybe 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

#8
post #4

Maybe 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 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/useable language though!

Post reply on HN