morpho
morpho copied to clipboard
[Feature Request] Warning for module imports with uppercase letters
Importing modules with the right name but incorrect cases results in an error. Morpho modules are by convention named using all lowercase characters, so it would be useful if Morpho throws a warning instead, highlighting the presence of uppercases in the import statement.
Confusion can be caused by namesake classes, since classes are named using uppercases by convention.
E.g.
>import MeshGen
Error 'MdlNtFnd' [line 1 char 14] : Module 'MeshGen' not found.
>import meshgen
>var mg = MeshGen(...
I think what would be a great idea here is if the resource finder locates a "nearby" resource, we could offer an error:
Module 'MeshGen' not found; did you mean 'meshgen'?