Open janroden opened 5 months ago
fork
calls the function defined by bend
recursively passing the new state of the recursion.object
and type
were good option.bend
could easily be called unfold
, you're correct. Also, it's just my personal opinion, but if it were called unfold
using bend
for the recursive calls would be a bit strange. I'm not aware of previous uses of the keyword bend
, but Taelin decided on that name and maybe had some inspirations I don't know about./
is just a matter of preference. But also note that /
is a normal name character that can be used however you want in function of variable names. If we used ::
that would be harder to do.u32
and u64
are planned and will be added as soon as HVM supports them.Thanks a lot for the detailed explanations! :-)
Maybe adding your explanation of fork
to the guide, where it's first used, would make it a bit clearer?
I also vote for enum
similar to rust enum
. But prefer data
instead of object
similar to python and kotlin dataclass
.
Object and Type are extremely abstract keywords that suggest nothing about actual functionality.
Even worse, type
is also technically incorrect use of the term.
I'll leave this issue open as a task to improve the initial explanation of 'fork'
This looks like a really cool project!
I just read through the guide, and really liked the writing style :)
At a few points, I was curious, would love to learn more about:
fork
function does exactly?object
andtype
, instead of e.g. juststruct
andenum
, like in Rust?Here I was wondering why
bend
was chosen as a keyword? Given the above explanation, wouldn't something likespread
,unfold
, orgrow
be more intuitive then? Or are there other use cases not covered in the guide, wherebend
makes more sense as a keyword? Or is there some history from other languages?Was curious why
/
was chosen for these kinds of namespaces / variants, instead of e.g. the::
like in Rust? Since normally/
is used for division?Is there already a plan for how other types, e.g.
u32
, will be indicated? Will there be something like Rust-like type annotations?Thank you! I'm looking forward to where this project is going :)