4 ms·
unicode sigils? yikes!
by jgalt212 11y ago
unicode sigils? yikes!
- schoen 11y agoThat reminds me of APL! https://en.wikipedia.org/wiki/APL_%28programming_language%29#Design https://en.wikipedia.org/wiki/APL_%28programming_language%29... https://en.wikipedia.org/wiki/APL_syntax_and_symbols https://en.wikipedia.org/wiki/APL_syntax_and_symbols https://en.wikipedia.org/wiki/APL_%28programming_language%29#Examples https://en.wikipedia.org/wiki/APL_%28programming_language%29... One of the examples there uses the ⍨ character!
- autarch 11y agoAs the second slide pointed out, you can use ASCII variants for everything. That said, I've found the Unicode operators nice to use in some cases, and I've been working on learning more about my compose key combinations.
- SwellJoe 11y agoIt sure makes for pretty code. And, it's gotten easy to use Unicode under Linux, Windows, and Mac OS X over the past few years. I posted an example of hyper operators a little while back, and used the Texas variants because I thought it might be intimidating to show them with Unicode...and, they were just so darned clunky looking, I had to change them back, and included a little note that there was a non-Unicode way to use the feature, as well
- eximius 11y agoIt is pretty, though some of the sigils still look... strange - at least if you expect them to look like they might in LaTeX or something. Still, I can't imagine having to type those regularly. I don't count keystrokes or anything, but that just seems harsh.
- SwellJoe 11y agoThe typing isn't the bad part...you're going to spend more time reading the code than writing it, and it definitely helps readability. But, I do find I have a hard time keeping enough of Perl 6 in my head to make sense of what I'm reading. I believe this is because it's so new to me, even though I've written and read Perl 5 or many years. But, it also seems intimidatingly large as languages go. Anyway, I think I'm sympathetic to where you're coming from; Perl 6 is challenging looking. We may disagree about why. But, I think I like the Unicode enough to consider it a net positive for readability, even though I also think it makes for a very broad and deep language that will need ages to properly wrap ones head around. But, then again, if a language isn't big and broad, a big and broad ecosystem develops anyway (see JavaScript and so-called "JavaScript fatigue" for a prime example of that), so there's still a tremendous amount to grok before being really productive and literate in the language.
- stevep98 11y agoYes, now what we need is a programmer's keyboard with some nice 'alt-keys' for those sigils.
- momzer 11y agoJulia has a few Unicode operators and will allow you to tabcomplete the LaTeX symbol in the REPL [1]. For example, \div followed by TAB becomes ÷. This can be implemented in popular editors [2]. [1] Not all are the common LaTeX macros. See http://docs.julialang.org/en/latest/manual/unicode-input/ http://docs.julialang.org/en/latest/manual/unicode-input/ [2] https://github.com/JuliaLang/julia-vim https://github.com/JuliaLang/julia-vim
- Arnt 11y agohttps://github.com/rrthomas/pointless-xcompose https://github.com/rrthomas/pointless-xcompose perhaps?
- zoffix222 11y agoI personally use XCompose and I'm eyeing the media keys on my keyboard as potential single-key operators. But you don't have to use fancy Unicode and can just use Texas variants.