Also love the example game. It's written so cleanly that I learned a thing or two about 2d gamedev just from scrolling through the code.
I love the little pragmatisms in the language, eg:
for (let entity in gGameApp.mEntities)
{
if (let enemy = entity as Enemy)
{
// .. do something with each enemy
}
}
That if/let/as combo there is something I'd have loved to have in many languages.Also hats off for switch/case without break. Finally! I also love how you're mixing C/C++ "global enum value names" convenience with namespaced safety:
public static Result<(char32, int32)> TryDecode(char8* buf, int bufSize)
{
...
return .Err;
// not Result.Err, because the return type is given in the signature
}
I know that these little syntactical things are not the key challenges of language design, but obviously they're the first things I see, and I like the amount of attention you've given them. You really only have the opportunity to get them right at the very beginning.I think the docs are a little sparse still (but that can be expected, of course). Eg:
- I found it hard to parse this:
public Random mRand = new Random() ~ delete _;
There's docs about it here https://www.beeflang.org/docs/language-guide/datatypes/initi..., but the "delete _" part isn't really explained. What's that underscore? I can infer that it probably means "this value", but I can't find it back.I love that you made it easy to destruct fields like that, right there in the initializer expression, btw. Will probably kill the need for 90% of destructor methods out there.
- Apparently this converts floats to ints:
(.)(mX - entity.mX)
Or at least it does in HeroBullet.bf:15. I'm thinking maybe this does something similar as `.Err`, in that the dot makes it cast to whatever the expected type is in the function being called? I'm not sure though, it looks like a super powerful feature, maybe :-)Finally, I believe .bf is also used for that other super convenient and performant language, Brainfuck. I doubt that causes any practical problems, but then again, why not just .beef?