4 ms·
What's with functional languages and the obsession with naming things after random sequences of punctuation characters? validateFrom(form.from).toValidatio
by jimbokun 12y ago
What's with functional languages and the obsession with naming things after random sequences of punctuation characters?
validateFrom(form.from).toValidationNel |@| validateTo(form.to).toValidationNel |@| validateBody(form.body).toValidationNel |@| validateRecipient(form.recipient).toValidationNel)(Email.apply)
What's the difference between "|@|" or "@" or "|@" or "|@" or "@@" or "@@@" or...
I'm sure this made perfect sense to someone at the time this decision was made, but naming things this way does absolutely nothing to help someone reading the code or using your library for the first time.
Can anyone explain the motivation for naming things in this way?
- xwowsersx 12y agoBecause they represent a well-known concept in category theory and symbols are a simple, uniform way of representing that concept. It's terminology. Math has terminology and so does category theory. Should we write (3 multiplied by 2 added to 5) in math? No. We write 3 * 2 + 5. Once you know those symbols, they're well understood and concise.