Idiomatically determine all the characters that can be used for symbols: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: mention that typical identifers are, well, typical)
Line 18: Line 18:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
Any Unicode character or combination of characters can be used for symbols in Perl 6. here's some counting rods and some cuneiform:
Any Unicode character or combination of characters can be used for symbols in Perl 6. Here's some counting rods and some cuneiform:
<lang perl6>sub postfix:<𒋦>($n) { say "$n trilobites" }
<lang perl6>sub postfix:<𒋦>($n) { say "$n trilobites" }


Line 26: Line 26:
{{out}}
{{out}}
<pre>8 trilobites</pre>
<pre>8 trilobites</pre>
Of course, as in other languages, most of the characters you'll typically see in names are going to be alphanumerics from ASCII (or maybe Unicode), but that's a convention, not a limitation, due to the syntactic category notation demonstrated above, which can introduce any sequence of characters as a term or operator.


=={{header|Python}}==
=={{header|Python}}==