Sigils
#914
Replies: 1 comment
|
Hm ... I will read about that. By very quick preview, I do like the idea of providing information with code itself, and idea of grouping common patterns, that are main ideas of some of the things we already do. On the other hand every new special character (that needs to be combined with already existing) brings more cost to the system, so I am very very wary of adding them. The upper casing of generic methods was in the air for few years because I didn't really like it, syntax-wise, and is still controversial now. I will read about it and think more on this and then reply properly. Thank you for the suggestion. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @refaktor, what do you think about the idea of adding sigils to Rye? Specifically the improved variety of Raku, not perl5.
My rationale is a) Rye already uses prefix/postfix markers for various effects so sigils fit right in, and b) sigils arguably benefit dynamic languages more than static, and with Rye's minimalist syntax even more so.
The biggest benefit is being able to see the most important type info - scalars, arrays, maps - amidst the otherwise homogeneous sea of words in Rebol-like languages (and Lisps). The existing
| . ^operands already help a lot with that for function/accessor words, making them pop out on the screen for fast scanning of the code structure, and sigils would make great companions for variables and flow of data structures.The other benefit is a further boost to Rye's fluidity by being able to treat/convert between the core types with minimal ceremony and great intuitiveness.
There's also some overlap or potential synergy with the new Generics/Methods - methods being more specialised, whereas there could be a namespace for all general
@arrayand%mapfunctions as well.And I don't think there'd be too much conflict with the other operands since they're used with verbs, whereas sigils would be for nouns.
Curious to hear your thoughts.
All reactions