operators.jl one sees that
==(x, y) falls back to
===(x, y), but interestingly,
==='s definition in
operators.jl is just…
I’ve never seen Julia syntax like it!
repl, one gets:
# built-in function; no methods
So where is
=== actually defined?
(And what are the cases in which the syntax on
operators.jl is valid Julia code?)
Core and isn’t a generic function (you can’t change what it does)
The runtime version is called jl_egal, is defined in C and defines the semantics. Obviously there’s lots of optimizations for special cases in different parts of the compiler though.
Thank you! In which source file can the code for
Core be found?
Searching for “jl_egal” in julia’s GitHub repo returns useful stuff, and it’s easy to spot the bit-wise comparison it performs (with
How the low-level
C function is associated with Julia’s
=== is the missing piece… perhaps that’s what’s in
Core, whose source code I’m still to find.
All builtins are defined as c functions and most if not all are in
builtins.c. You can find all the relevant code by searching for
src/ and ignoreing all the ones in comments…