5 ms·
It seems a massive violation of basic DRY to come up with new names instead of using those that have been a staple in math for the last 50 years. It's also just
by Kutta 13y ago
It seems a massive violation of basic DRY to come up with new names instead of using those that have been a staple in math for the last 50 years. It's also just about 5 words in total, if you count the most important and widely used Haskell/FP typeclasses. I really hope people in general are able to memorize five words.
- coldtea 13y ago>It seems a massive violation of basic DRY to come up with new names instead of using those that have been a staple in math for the last 50 years. DRY is not abour reusing names from other fields. Perhaps you were going for the "principle of least surprise". But given that most people are not familiar with those Math names in the first places (including mathematicians not versed in type theory, trust me, I've asked a few Math colleagues from university and it's chinese to them too), I doubt even that applies here. So, no, some arbitrary names like Monoid and co, obscure even for people with a passable Math knowledge, picked back in the day, is not the best naming scheme for that behavior that people can come up with. The best that it has going for it is that is has been used in Math "for the last 50 years" (still, hardly a "staple"). A lot of math naming and notation is arbitrary and a historical accident. That was one of the things the "axiomatic language" guys tried to solve back in the '20s after all.
- jroesch 13y agoIf you don't know what a Monoid is you are probably a pretty poor mathematician as it is core structure to do even undergraduate abstract algebra. Many computer scientists already understand reasoning about abstract structures and use them in their work. For example commutative operators are incredibly powerful tool in distributed systems, as I am able to disregard ordering. In general it is useful to be able to say that if I meet an abstract specification (i.e a Monoid, Group, Ring, ect) because it allows me to perform operations with confidence that they are correct. If you doubt the usefulness of this just look to Twitter (can't get much more "real world" than that) and see how they have been leveraging abstract reasoning in projects like Summing Bird (and its sub-projects like Algebird, Bijection, ect).
- Iftheshoefits 13y agoI think what you meant to say was "you are probably not very well versed in a specific branch of mathematics." Because otherwise you're coming off as needlessly--and baselessly--arrogant asshole who also has mistakenly generalized his specific area of expertise far beyond what it actually is.
- coldtea 13y ago>If you don't know what a Monoid is you are probably a pretty poor mathematician as it is core structure to do even undergraduate abstract algebra. Well, I asked undergraduate math students on their final year, and they didn't know. Perhaps all PhDs in math do, but that's not much of an argument in reusing those terms in CS. Myself had several classes of algebra in different years in university (for the CS degree) and we didn't ever talk about Monoids and such.
- nzp 13y ago> Well, I asked undergraduate math students on their final year, and they didn't know. I have no reason to not believe you, but how is this possible, and what does it say about either those students or that university or even both? Do they also not know what a group is? A ring, a field? How can a mathematician (and a nearly graduated student in maths is certainly a mathematician) not know what basic algebraic structures are? I'm shocked, frankly. It's literally equivalent to saying they don't know what real numbers are, without exaggerating one bit.
- coldtea 13y ago>* I have no reason to not believe you, but how is this possible, and what does it say about either those students or that university or even both? Do they also not know what a group is?* They should know what a group is, because even us, CS students, were taught group theory for a whole semester. As for the monoid thing, I guess they could have been taught at some point, along with being taught 20 other branches and fields of mathematics in different classes, and they were more likely to remember a) the basic stuff, b) the stuff they started to specialize on and concentrated upon writing their thesis. So, I guess if I had talked to someone who had taken a preference to type theory and such, they would have known. >How can a mathematician (and a nearly graduated student in maths is certainly a mathematician) not know what basic algebraic structures are? I'm shocked, frankly. It's literally equivalent to saying they don't know what real numbers are, without exaggerating one bit. Is it? I don't know. You can read whole books in Algebra and not mean the word "Monoid" once in them, including some university books. For example (not even one mention): http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=9780387406244 http://www.amazon.com/gp/search?index=books&linkCode=qs&keyw... This again no mention: http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=9781285402734 http://www.amazon.com/gp/search?index=books&linkCode=qs&keyw... This (a "graduate level" book) only mentions Monoid once, somewhere on the first pages, and adds that it won't be emphasised: http://books.google.com.sg/books?id=C4TByeUh9A4C&printsec=frontcover#v=onepage&q&f=false http://books.google.com.sg/books?id=C4TByeUh9A4C&printsec=fr... And I'm pretty sure in our Algebra books (for CS students, 2 classes in the 1st and 2nd year) there was no much mention of monoids (or, possibly, the professor skipped over those chapters, maybe had some brief explanation and went on to other things). Of course, what university gradutes of a field do not know can sometimes be even more daunting. For example, a surprising percentage of degree-ed Computer Scientists cannot even solve the fizz-buzz problem: http://blog.codinghorror.com/why-cant-programmers-program/ http://blog.codinghorror.com/why-cant-programmers-program/
- marssaxman 13y agoWe are not mathematicians. Those terms are not really part of our industry.
- freyrs3 13y agoUm, which industry do you work in? Enormous amounts of words from mathematics have been incorporated into the programming lexicon. Vector, matrix, index, graph, tree, function, domain, ... the list goes on and on.
- Pacabel 13y agoThe words you listed tend to have well-understood meanings in numerous contexts aside from mathematics that are still related in some way to the software concept. Some of those words are very likely non-mathematical words that were adopted and re-purposed by mathematicians. "Tree" is inspired by how the data structure's shape is very similar to that of trees (that is, the plants), for example.
- freyrs3 13y agoYou missed the point, they all come from mathematics and their meaning in the context of programming is precisely related to their mathematical context.
- jroesch 13y agoThough many of us are computer scientists (at least by education), and engineers. Vocabulary does not just manifest out of thin air. Where do you think the words function, or algorithm came from? I can tell you they were in use before 1950. We have already collectively borrowed a huge amount of vocabulary from mathematics. There is nothing wrong with adopting a few more that accurately describe what these objects are. For example we could call Functor Mappable or some such but it falls short in describing the abstraction. For example functions of one argument form a Functor and its "map" is function composition. So for functions Mappable is a pretty poor name. Edit: Yes languages get this wrong but I was focusing on the borrowing of vocabulary more so than the correct usage of it. Many words are abused like Functor to mean function object in C++, functions referring to procedures, ad-hoc vs. parametric polymorphism, strong and weak typing ect.