partialfunction has a nice summary, but partial-functions is probably a better name. It seems like they are duplicates.
-
I don't think there is a need to re-tag, just create a synonim and adjust tag info on partial-functions. Perhaps even duplicate it from partialfunction– LuuklagCommented May 3, 2018 at 11:15
-
2Note that [partialfunction], as it currently stands, is an ambiguous tag. In e.g. Haskell and Scala, "partial function" means a function which is not defined for all of its inputs. Haskell questions about the concept covered in the Python-centric tag wiki are often (and correctly) tagged as partial-application.– duplodeCommented May 3, 2018 at 14:07
-
@duplode You're right. It might be worthwhile to add partial-function-appplication as a synonym of partial-application.– Neil GCommented May 4, 2018 at 9:16
1 Answer
There is a complex tangle of tags here:
Even though the tag wiki of partialfunction is Python-centric, only 11 of the (as of now) 108 partialfunction questions are Python ones; rather, a large majority of them (91) are Scala questions.
The usual meaning of the term "partial function" in Scala (as well as in e.g. Haskell) is "a function which is not defined for all of its inputs".
partial-functions has only 24 questions, 15 of them being Scala ones. The bias towards the partialfunction spelling is a result of there being a
PartialFunction
type in Scala.In a Scala context, the concept currently presented in the aforementioned tag wiki is known as "partial application"; the corresponding tag is partial-application (155 questions -- 43 for Haskell, 36 for Scala, and only 5 for Python).
On the Python side, both PEP 309 and the functools docs refer to the concept described in the tag wiki as "partial function application"; at no point they speak of "partial functions". Still, the relevant functools class is called simply
partial
, and people end up referring to what it provides as "partial functions" (for the sake of comparison, the corresponding Haskell jargon is "partially applied functions").
If we are going to tidy up those tags, I suggest the following course of action:
Make partialfunction Scala-centric, by rewriting the tag wiki and moving all questions that do not involve an entity called
PartialFunction
yo partial-functions.Make partial-functions explicitly language agnostic, covering both the Scala/Haskell meaning ("not defined for all of its inputs") and the Python one ("partially applied function"), in that order. (The information currently in the partialfunction wiki would be moved to a section of the partial-functions wiki.)
Create partial-function-application as a synonym of partial-application, as you have suggested.
There are two further measures that are worth considering, even if they might be somewhat more contentious:
Remove the references to partial function application from partialfunction and partial-functions, and retag all questions involving it with partial-application. Though that would arguably result in cleaner tags, it is a rather prescriptivist move. There is also the risk of it becoming an exercise in futile disambiguation, if we are unlucky.
Make partialfunction a synonym of partial-functions. This might be seen as taking away a reasonable tag from the Scala folks.
Procedural note: I began to work on the action plan outlined here. #1, #3 and #4 (as opposed to #2) have been done. #5 is still pending.
-
4I like 4 and 5. Languages don't typically get their own tags for generic programming terms. E.g., virtual-function, polymorphism, inheritance. If you insist on a scala-centric partial function tag, then I think it should probably be called scala-partial-function.– Neil GCommented Jun 4, 2018 at 5:28
-
@NeilG [1/2] Personally, I rather like #4 and #5 too -- #4 is arguably a technically correct move; as for #5, I tend to favour language agnostic tags about concepts over concrete class/function ones (though I don't think there is a Meta consensus about that). I have toned down the language in my answer somewhat; let's see how the community reacts. I think it would be good to hear from people active in [scala] about this (and from [python] people too, but in that case we at least have you here :)).– duplodeCommented Jun 4, 2018 at 17:22
-
@NeilG [2/2] For an interesting, if inconclusive, recent discussion about language agnostic versus language specific, cf. Should we synonymize or should we dissociate [each], [foreach] and [for-in-loop]?– duplodeCommented Jun 4, 2018 at 17:23
-
As a Scala folk, I wouldn't object to 5, but for 4 I'd definitely expect Python questions to get back in in time. Commented Jun 11, 2018 at 18:09
-
You don't mention it, but the Scala/Haskell meaning is also the mathematical one (and that's its origin).
partial-(function)-application
should also probably be explicitly mentioned in partial-function. Commented Jun 11, 2018 at 18:17 -
@AlexeyRomanov Good to hear that about #5. As for #4, on the other hand, the influx of questions seems small; on the other hand, the folks most interested in keeping the tags unambiguous (e.g. [scala] and [haskell] regulars) likely won't ever see those Python questions...– duplodeCommented Jun 11, 2018 at 19:59
-