Request : imports allowed anywhere

BlitzMax Forums/BlitzMax Programming/Request : imports allowed anywhere

which seems lazy to me
OK, then I'm lazy. That's fine to me. Lazy bones make good programmers. They're better at factorization.

I have no problems importing .bmx files in a program that are not modules.
You missed the point I'm afraid. I want to be able to include files that do imports (whatever it imports). I just can't.

But hey, I don't care if anyone finds it usefull ot not, I just don't get the point of explicitely forbidding it.

If you say why should I be able to do it, I'd like to say: why not? And in front of that I see good reasons to *allow* it. I'm not saying it will change the face of programming in BlitzMAx, it will just make my life easier from time to time.

You should also have a word with Sun, while you are at it, and tell them that Java should allow imports anywhere in the code too. Damn those Sun people - they think they know everything... tsk.. pah...
Except I can actually import at the start of every java file...
And it wouldn't make sense to import inside a class, right? ebcause every pice of code in java is inside a class, which isn't the case at all in BlitzMax. So maybe I'd need a better phrasing: I want to be able to put an import everywhere at the global scope.
In addition, making a module requires to have it in the mod directory. That's annoying enough that I don't want to do it for little code snippets. That's my main concern personnaly. If I could have modules in my own project's folder then that would be all fine.

Why anyone would want to Include all the .bmx files and recompile all 15,000 lines
And you missed one thing again: the "20 lines" part. I make modules when it makes sence, but for little code snippets I'd rather not. Is it SO much beyond you?

Because the compiler needs to know the entire interface topography before it can parse the source code?
Nope. How the hell can I call a function defined later on then?