buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.22k stars 34 forks source link

`ud` literal and operations #294

Open giann opened 4 months ago

giann commented 4 months ago

Event though a ud is stored on the heap and not in a Value, we could imagine being able to write a literal ud value rather than having to do parseUd("..."):

| Literal can be hex, binary or decimal like a regular integer
ud data = @0xffab3adb3298;
ud data = @1239408984;

Maybe @ will collide with free identifiers (@"my identifier")

We could also imagine being able to do everything we can do with an integer with them, even though it would be inefficient:

ud data = @0xffab3 + @1;