3 ms·
The feature is fine but there are better reasons to introduce it. For macro generated code it is convenient to use identifiers that people won't accidently use
by soegaard 1y ago
The feature is fine but there are better reasons to introduce it.
For macro generated code it is convenient to use identifiers that people won't accidently use in their own code. The ability to use arbitrary identifiers solve that.
- codr7 1y agoExcept people can also use arbitrary identifiers in their own code now?
- int_19h 1y agoThe other reason is interop with other languages, which might have their own rules for identifiers.
- codr7 1y agoI'm trying and failing miserably to think of a single example of such a language.
- akdor1154 1y ago.NET allows pretty much anything except a space, i think?
- codr7 1y agoAnd you can call into .NET (I assume that means C#) directly from Swift?
- neonsunset 1y agoKind of? :) https://github.com/royalapplications/beyondnet https://github.com/royalapplications/beyondnet
- layer8 1y agoYou can always work with aliases in that case. No strict need to “contaminate” a language with foreign identifier syntax, in particular if it’s still not 1:1 due to the backticks (e.g. identifiers containing backticks).
- layer8 1y agoIt lessens the likelihood of a collision, but doesn’t remove it.