Missing documentation for `this` keyword (actually not)

I came across Base.jl include, and saw this. Since Julia is not OOP, I had never seen this before. The keyword is not even documented, searching gives 0 results. I tested it myself in REPL and this seems to be a reference to the current module (?).

Isn’t it just a callable/functor ? See Methods · The Julia Language

For instance, I guess that writing

(dog::IncludeInto)(fname::AbstractString) = include(identity, dog.m, fname)

would also work.

I see, I know callable functors, but using this specifically is really quite confusing at first. I also tested it the wrong way. Thanks!

To be very precise, it is the variable name of the concrete instance of the functor you define. And yes you can name that whatever you like.

tangential, but there are one or two people who will get very bothered if we keep using the term “functor” :wink:

Sured, the docs still say “(sometimes called ‘functor’)” and I think formerly that was even more prominently called so, so somehow that’s what got stuck in my head. Will adapt head.