3 ms·
Sometimes you are expressing a specialized concept that, even when translated into words, won't be readily understood by someone without domain knowledge. That'
by kccqzy 8y ago
Sometimes you are expressing a specialized concept that, even when translated into words, won't be readily understood by someone without domain knowledge. That's when I believe symbols are very useful.
In this case we are dealing with an applicative functor. If you know what's an applicative functor, you will immediately know what these symbols mean. If you do not, even if we translate <* as `sequenceActionsKeepFirstValue` you still don't know what this is doing.
- hota_mazi 8y agoI know what an applicative functor is and I struggled to map what <* and *> are. These are not standard, even in the niche world of functional programming.
- jdreaver 8y agoThese symbols are part of the definition of the Applicative type class in Haskell http://hackage.haskell.org/package/base-4.11.1.0/docs/Control-Applicative.html#v:-42--62- http://hackage.haskell.org/package/base-4.11.1.0/docs/Contro...
- djur 8y agoSame with Idris and Scalaz. I don't know how much more standard it could be.
- whatcanthisbee 8y agostandard it might be, but I seriously hope IDEs would give a hint on what to google when a junior sees "<"... try googling < or "scala <*"...
- hendi_ 8y agoI kind of miss the days where you would turn to the manual, read and understand it, before doing serious work in a language. I've had a junior dev ask me what kind of strange multiplication thing was going on in our C code base. If you don't even know about pointers, maybe you're not "junior" yet and should learn some more.
- chriswarbo 8y agoThe asterisk symbol in C is heavily overloaded too; it can mean a pointer type, dereferencing a pointer, multiplication (of ints, floats, ...).
- whatcanthisbee 8y agoanother instance where IDEs can help juniors by providing hover-to-show-name/descriptions
- still_grokking 8y agoAn IDE should just show the pronounceable name of that symbolic alias on hover. Symbols are fine as long as they're alias names for fully written out names. I think Scala will support such an IDE feature with an @alias annotation in the future. (I saw that idea on a slide in a talk of M. Odersky some time ago but actually don't know the current status).
- posterboy 8y agoSearch features for language documentation should recognize special characters as such. For asterisk that gets very ambiguous though, unless it uses regex or something else, standardly.
- pas 8y agoThen use nicknames, or abbreviations. Searching for symbols is very hard on the NLP dominated Web. And even if Google is getting better (but I tried a month ago with Scalaz symbols, and half of them failed), the other search engines (for example Lucene used by forums, or full text indexes) will strip out every non alphanumeric character.