3 ms·
We make up new line-noise (=combinator runes) all the time in Haskell. The lens library alone has over 100, see https://www.fpcomplete.com/school/to-infinity-a
by eru 11y ago
We make up new line-noise (=combinator runes) all the time in Haskell. The lens library alone has over 100, see https://www.fpcomplete.com/school/to-infinity-and-beyond/pick-of-the-week/a-little-lens-starter-tutorial#actually-there-are-a-whole-lot-of-operators-in-lens---over-100 https://www.fpcomplete.com/school/to-infinity-and-beyond/pic...
Haskell people invent and a lot of new and strange things. Renaming punctuation is not one of them.
I guess it doesn't matter as long as you never use your new names in writing. (And why would you, you can use use the symbols themselves.) But then, of course, why bother with these names at all apart from creating an oral tradition.
- urbit 11y agoSpeaking from experience, I guarantee you that anyone who starts saying "centis" instead of "percent equals," whether in the context of Hoon or Haskell lenses or anything, will never go back. I have to force myself to "code-switch" when speaking to the uninitiated, even in a technical context that has nothing to do with Urbit. And I'm not the only one. I can't fault Haskellers for their daring in pushing the limits of programming languages as a UI. For instance, the idea of custom, library-specific "line noise" terrifies me. Hoon has no macros, no custom syntax, no operator overloading, etc. Once you've learned the line noise you've learned it. The lens library in particular is a DSL by anyone's definition. Arguably (well, I'd argue it anyway), the ease of constructing DSLs is a trap that's impeded adoption of both major families of FP, Lisp and Haskell/ML. Plenty of people have made the "DSL == write-only" argument, so hopefully it's sufficient to just reference it. Lens is in a sense the quintessential expression of Haskell; I don't know how anyone grounded in reality could expect the average Java programmer to learn and master it. And yet, everything it's doing is beautiful and true and right. Basically, resolving this contradiction strikes me as the essential problem of functional programming, if not just programming, in the next decade. I personally am very far from being the most qualified person to solve this problem. But I feel not enough people are working on it.
- eru 11y agoInteresting enough, `lens' is a bit of an outlier in Haskell land---exactly because it is too Java-like in its intricate hierarchies for some people's taste. I like the Haskell approach to operators as just a funky syntax for functions. No need to bake any operators as keywords into your language. +, =, etc are all just part of the standard library. (I also like the Lisp stance of mostly just not caring about line-noise symbols vs letters.)
- JoshTriplett 11y ago> I have to force myself to "code-switch" when speaking to the uninitiated, even in a technical context that has nothing to do with Urbit. That's one of many reasons I wouldn't want to switch even if it was more efficient, for much the same reason that I have no plans to learn Esperanto or switch to Colemak. That's also precisely why I suggested it was much like requiring a custom keyboard. I can say "x mod equal y" to almost anyone technical, and they'll immediately understand it as "x %= y". One syllable for understandability. And considering how rarely I actually speak exact syntax aloud, that seems well worth it. (It occurs to me that someone designing and using a new programming language seems far more likely than average to have to communicate syntax verbally.)