# Function-like objects terminology

**URL:** https://discourse.julialang.org/t/function-like-objects-terminology/59454
**Category:** New to Julia
**Tags:** question
**Created:** [April 17, 2021, 1:10am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454 "2021-04-17T01:10:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [April 17, 2021, 1:10am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454/1 "2021-04-17T01:10:02Z")

</div>

[Methods · The Julia Language](https://docs.julialang.org/en/v1/manual/methods/#Function-like-objects) says

> Methods are associated with types, so it is possible to make any arbitrary Julia object “callable” by adding methods to its type. (Such “callable” objects are sometimes called “functors.”)

In Python, objects that can be called are termed “callables”. In functional programming, “functor” means something, but I’m not seeing if they’re somehow the same concept or just a name coincidence?

> **[Functor (functional programming)](https://en.wikipedia.org/wiki/Functor_(functional_programming)#:~:text=In%20functional%20programming%2C%20a%20functor,in%20Haskell%20using%20type%20class)**
>
> In functional programming, a functor is a design pattern inspired by the definition from category theory that allows one to apply a function to values inside a generic type without changing the structure of the generic type. In Haskell this idea can be captured in a type class:
> This declaration says that any type of Functor must support a method fmap, which maps a function over the element(s) of the Functor.
> Functors in Haskell should also obey functor laws, which state that the mapping operati...

---

<div class="post-metadata">

### Author: ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)
#### Post date: [April 17, 2021, 1:30am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454/2 "2021-04-17T01:30:48Z")

</div>

I can’t speak for the choice of terminology in the docs, but there is a library for the category theoretical definition of Functors: [GitHub - FluxML/Functors.jl: Parameterise all the things](https://github.com/FluxML/Functors.jl)

---

<div class="post-metadata">

### Author: ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)
#### Post date: [April 17, 2021, 2:29am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454/3 "2021-04-17T02:29:10Z")

</div>

Good question. I’ve also wondered about that…

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [April 17, 2021, 2:48am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454/4 "2021-04-17T02:48:06Z")

</div>

Julia uses pretty much the [C++ definition of Functor.](https://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html) But functional languages also seem to use a few different meanings for Functor. It’s a vague word.

---

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [April 17, 2021, 2:53am UTC](https://discourse.julialang.org/t/function-like-objects-terminology/59454/5 "2021-04-17T02:53:16Z")

</div>

> <https://softwareengineering.stackexchange.com/questions/421566/definition-of-functor-haskell-vs-c>

> The C++ community is one of only a few programming communities that does not use this meaning.

Seems like “callable” is a clearer word for this concept. I wonder if Julia could start using it instead.
