Personally, I don't like those questions.
- If the asker really wants the feature to behave 100% exactly like in the other language, then answering the question requires wizard-level mastery of both languages in order to understand whether the two features really behave identical under every possible circumstance in every possible environment in every possible interaction with every possible other feature, which greatly diminishes the pool of possible answerers.
- If, OTOH, the asker is only interested in a rough analogy or a subset of the feature, then she needs to specify what she is interested in in sufficient detail, but once she has done that, there is no need to even mention the other language.
There are so many intricacies in each and every language that having features in two languages that behave identical is pretty much impossible, so the OP needs to specify anyway which subset of behaviors she is interested in, at which point the question is usually precise enough that it doesn't even need the reference to the other language anymore.
Just looking at your three example questions:
- The first one fully specifies the intended behavior in terms of the type signature (the great thing about purely functional programming with an expressive, powerful, static type system is that you need to know only the types to figure out what a function does). It is a bit terse, but knowledge of Haskell and/or
mapM
is not required to answer the question. (In fact, if Scala had a search engine for type signatures such as Haskell's Hoogle, the question could be answered mechanically!)
- In this question, the mention of Haskell's
undefined
is actually confusing, and the OP is misrepresenting what undefined
is. undefined
is the bottom value, i.e. the value that represents computation that doesn't terminate (e.g. an infinite loop). The OP is not interested at all in that. All he wants, is a way to leave a piece of code un-implemented without generating a type error. You could remove any mention of Haskell and undefined
, and the question would still be answerable.
- The question misrepresents / misunderstands how enrich-my-library (the new politically-correct spelling) actually works, and again, the mention of how it works in Scala is completely and utterly irrelevant, since the author is not actually interested in replicating the behavior of Scala, but merely wants a way to enrich existing types with new behavior. As this answer about the Unified Function Call Syntax proposal points out, the way to achieve that in future C++ is probably going to be completely different to what Scala does, so any mention of Scala is simply distracting and leads to answers like this which correctly points out that the equivalent mechanism to Scala doesn't exist.
So, in my opinion, the question requires a precise specification anyway, so that any mention of another language simply becomes an additional data point, but expertise in that language is not necessary (nor sufficient) to answer the question. Then, why tag it?