Primitive operators haven't got much love, as opposed to user-facing interfaces like the stdlib, and they have grown organically since the beginning of the very first Nickel prototype. As a result, the naming is inconsistent, with several generations, both in the surface syntax of Nickel and internally in the Rust codebase.
This PR makes a cleaning pass on primitive operators, by:
Use full worlds in the style of the current stdlib: str ->
string, num -> number, etc.
Introduce pseudo-namespaces: instead of str_foo and record_bar, we use / as a separator for categories. The previous examples become string/foo and record/bar. We don't use ., to make it clear that it's not a normal record access, but just a nice way to dinstinguish the different categories
Align old operators on the current naming in the standard library.
This PR is mostly read for review, but in order to appease the CI, I need to update the tree-sitter grammar first to accommodate for the / character in primops.
Primitive operators haven't got much love, as opposed to user-facing interfaces like the stdlib, and they have grown organically since the beginning of the very first Nickel prototype. As a result, the naming is inconsistent, with several generations, both in the surface syntax of Nickel and internally in the Rust codebase.
This PR makes a cleaning pass on primitive operators, by:
str
->string
,num
->number
, etc.str_foo
andrecord_bar
, we use/
as a separator for categories. The previous examples becomestring/foo
andrecord/bar
. We don't use.
, to make it clear that it's not a normal record access, but just a nice way to dinstinguish the different categoriesThis PR is mostly read for review, but in order to appease the CI, I need to update the tree-sitter grammar first to accommodate for the
/
character in primops.