Is there a way in Crystal to import a class or method from a file with a given prefix (as if said objects (class, method, variable) were defined in a given Module)?
For instance, how could I invoque say mathematical functions (sin(), cos()) from an hypothetical external math file as math.sin() math.cos() rather than as bare sin(), cos(), in order to make it obvious that these methods are
- Moreover imports from a specific file named «math»
Of course, if I am the author of said « math » file, I can achieve this effect by further wrapping this library of external methods in a module with the same name, but what if I am not the author of said file, but still want « explicit » imports or explicit references to the imported file?
Is there a (possibly optional) syntax like « require myMath as math » or something similar in Crystal?