Could we have letters A-Z allowed in module names?

BlitzMax Forums/BlitzMax Programming/Could we have letters A-Z allowed in module names?

Fabian.(Posted 2006) [#1]
As I created some modules I noticed that we cannot use letters A-Z in module names; only letters a-z are allowed.
So if you create a module named "TestScope.TestName" the compiler throws "Can't find interface for module." when you try to access it. However a module named "testscope.testname" works without errors.

Could you please make the compiler able to compile modules containing the letters A-Z?


popcade(Posted 2006) [#2]
In Linux Test is different test or TEST, BMax stands for cross-platfrom so I think case sensitive is a reasonable way.


Dreamora(Posted 2006) [#3]
if it would be cross plattform same behaving.
Because on Windows, the case does not mather on modules or include / import.


H&K(Posted 2006) [#4]
Yep Dream is right.

Crossplatform means in this situation that Case is delt with in a way that all three systems can do. As windows thinks a file "Mine.bmx" is the same as "mine.bmx" then even though Linus (or Max) doesnt Bmax has to conform to the lowest common denominator


popcade(Posted 2006) [#5]
It makes sense, however it's just for preventing confusion.

Many people use all lower-case to avoid this issue, personally I just capitalize the main source and it's imply a habit and save some time to change file name when I switched to Ubuntu.

If you think it's a bug, you can post it to bug report.


Fabian.(Posted 2006) [#6]
I don't understand why it needs to be lower cased because linux is case sensitive.
BMX should support the lowest common denominator; this is windows, because windows doesn't allow to have file and File at one time, linux in contrast allows this. So I think module names should be case insensitive like windows file names (and like function names and variable names). It would run on linux as well. If not the compiler could use something like CasedFileName to find the module source file even if the module name wasn't typed in correct case.
I see there's a different between the operating system's concerning case sensitive or not, but I don't see that this is a reason for making all names lower case though all platforms support upper case letters.


popcade(Posted 2006) [#7]
Mark may do this change if he think it's required, so just wait to see it happen, as most people don't actually care this, maybe 1.24 or later this will change.


Picklesworth(Posted 2006) [#8]
I don't see the point...

It just creates something that can go wrong when porting to a case-sensitive operating system.


H&K(Posted 2006) [#9]
Ive changed my mind, lets alow capitalization in the modual names. Just make sure that you cannot have the same name even if it has different capitalization.

Afterall it wont create anything that can go wrong on WinOS, it will just mess Lynx systems up. And I dont really care about that ;)

(Oh and as a bonus, it might messup macOS as well)


Defoc8(Posted 2006) [#10]
Then perhaps bmax should follow C++, and become case
sensitive? - if your looking to follow some kind of standard,
why not follow the standards setup by leading professional
languages.. personally i dont see how any of this represents
a real problem, so long as your aware of it..


Dreamora(Posted 2006) [#11]
Because C++ is outdated perhaps? Its only "wanted" by build your own OS anymore. MS and Apple have their refreshed C versions for the future.

I don't see any problems as well but I agree that the module names should be case insensitive as it is one of the most annoying problems caused by BMs so called cross-plattform ness


cloned(Posted 2006) [#12]
i use underscores for pretty much everything i need

so no captial letters problems here


Fabian.(Posted 2006) [#13]
What I expect is that you can use upper letters as well as lower letters, but that you can't have the same name twice even if in different case. This is how it's done with windows file names, html/xml-tag names, network host names, forum names, Java class, variable, method and package names and BlitzMax variable, function, method and type names - so why not also for module names? A case insensitive system allowing upper cased letters as well as lower cased letters is just a common standard. What I want is just a bit consistency, so if I can use upper cased letters in function, variable, etc names I also want to use it in module names.


TomToad(Posted 2006) [#14]
I would imagine that BMAX could easilly implement something like that, but a problem I see is when someone is creating a module and saves it as "Mymodule.bmx" Then later makes some changes and resaves it as "MyModule.bmx" Under Linux, a whole new file will be created so you will now have Mymodule.bmx and MyModule.bmx on the hard drive. A case insensitive Blitzmax would probably build the first one and the programmer will spend weeks banging his head on the keyboard wondering why his changes are not working.


Picklesworth(Posted 2006) [#15]
What I expect is that you can use upper letters as well as lower letters, but that you can't have the same name twice even if in different case.

That's part of the right solution; also, leave that up to the programmer, making module importing case insensitive. (You could type it with capitals, but the precompiler fixes it for you).
Otherwise Linux programmers would start getting in arguments with Windows programmers about module names :b