4 ms·
User defined types are __no__ different than "native" types. You are talking to the llvm compiler, sure you are talking in Julia most of the time, but if you h
by tejtm 8y ago
User defined types are __no__ different than "native" types.
You are talking to the llvm compiler, sure you are talking in Julia most of the time, but if you happen to want to talk in C or FORTRAN or ASM in the middle of your high level script, just do. No marshalling of I/O or data structure impedance it all compiles the same.
- nextos 8y agoExactly. Typing choices are a key part of what makes Julia interesting. And user types are first-class.
- earenndil 8y agoSo can I define custom operations in llvm ir?
- tejtm 8y agoYou can write custom code in llvm IR.[0] I must leave it to you to tell me if you can use it as an operator. My guess is yes, but I will not be getting to play any time soon. [0]https://docs.julialang.org/en/stable/base/c/#Core.Intrinsics.llvmcall https://docs.julialang.org/en/stable/base/c/#Core.Intrinsics...