title: Symbols that break the identifier rules, e.g. `sub ::("☺") { }`
body: <p>With the current Rakudo compiler (v2021.10), <a href="https://docs.raku.org/language/glossary#index-entry-Symbol" rel="noreferrer">symbols</a> declared with the <code>::(…)</code> form do not need to follow the <a href="https://docs.raku.org/language/syntax#index-entry-identifier_identifiers-Identifiers" rel="noreferrer">rules for identifiers</a> even when they declare the name of a routine.</p>
  <p>This means that the following is code produces the indicated output:</p>
  <pre class="lang-raku prettyprint-override"><code>class C { method ::(&quot;A method name that's also a sentence!&quot;) { say &quot;this works&quot;} }
  sub ::(&quot;☺&quot;) { say &quot;also works&quot; }
  
  C.&quot;A method name that's also a sentence!&quot;();  # OUTPUT: «this works»
  &amp;::(&quot;☺&quot;)();                                   # OUTPUT: «also works»
  </code></pre>
  <p>My question is whether this is valid <strong>Raku</strong>/an intentional feature or whether it's something accidental or Rakudo specific.  I don't see any mention of this syntax in the Raku docs, nor do I see a Roast test covers creating symbols like this.</p>
  <p>(There is a somewhat related <a href="https://github.com/Raku/roast/blob/master/S02-names/symbolic-deref.t#L149-L156" rel="noreferrer">Roast test</a> about using special characters in symbolic <em>de</em>references.  However, in addition to not being directly on-point, that test contains the slightly unhelpful comment &quot;Note: I'm not 100% sure this is legal syntax&quot;.  That comment (and that test) were added more than 13 years ago, so this area doesn't seem to have attracted a lot of attention.)</p>
  <p>I'm asking in part because, if legal/intended, this syntax seems like one that could be pretty useful in niche situations (especially for methods, where the calling syntax is nicer).  It reminds me a bit of <a href="https://kotlinlang.org/docs/coding-conventions.html#names-for-test-methods" rel="noreferrer">Kotlin's syntax</a> <code>`for allowing spaces in backtick delimited method names`</code>.  So, if it's part of Raku, I'd like to use this syntax (sparingly!) and add it to the docs.</p>