3 ms·
The advantage with sigils, that little bit of standardized extra information means that I don't have to do any work to distinguish a verb from a noun. It makes
by daotoad 6y ago
The advantage with sigils, that little bit of standardized extra information means that I don't have to do any work to distinguish a verb from a noun. It makes it possible to use names that are just a bit shorter, on average, without sacrificing readability.
It's funny to me to see the same people who complain about sigils in perl whole heartedly adopt the Rx convention of naming streams with a tailing $.
It's literally just a sigil. Yeah, you put it at the end, but it serves the same exact purpose.
- azangru 6y ago> It's funny to me to see the same people who complain about sigils in perl whole heartedly adopt the Rx convention of naming streams with a tailing $. It's literally just a sigil. This one is a naming convention. Same as how the previous generation of javascript developers used to prepend variable names with a dollar sign if those variables referred to jquery-wrapped objects. Same as starting class names with a capital letter, or using all capitals to name constants. It doesn't have any special meaning for the parser. Your program won't break if you don't follow these naming conventions. It's entirely a style thing.
- daotoad 6y agoSo an unenforced convention that does the same thing as a sigil, but worse. It can't be relied upon because it's not enforced. I've lost count of how many times I've seen streams without their trailing $ in codebases where people were theoretically using them. If you can't rely on the symbol or its absence meaning anything, it's just more punctuation.