Who's idea was it to make "Main" and "Current"...
BlitzMax Forums/BlitzMax Programming/Who's idea was it to make "Main" and "Current"...
| ||
Who's idea was it to make "Main" and "Current" keywords? This is awful. |
| ||
I wondered what this is about! |
| ||
If I wouldn't know it better then I would say those are thread handles, for the process main thread as well as the current thread within you are working. If thats the case then they potentially would have been better named them "more meaningfull" |
| ||
Truly awful indeed... I think Mark should ask us first next time... I wonder why this works: SuperStrict Framework brl.standardio Local Current:Int = 10 Print Current How... strange... |
| ||
Well I had a "main" variable in my program from the beginning! |
| ||
@Brucey: If you refer to the "Current" Identifier.. you are propably overriding it. Imho there also should be a String.FromInt missing. Imho. |
| ||
Imho there also should be a String.FromInt missing. Imho. Huh? |
| ||
Sorry for your loss, man ;-) |
| ||
The reason I bring it up is I have a field of a type called "main" (lower-case) and the editor always converts it to upper case. Then the Lua command set is generated, and it is case-sensitive, so I have accidentally caused errors with that. I suggest leaving the commands along and just making them not highlighted. Or replace them with highlighted commands MainThread() and CurrentThread(), and leave the old commands in for backwards compatibility. |
| ||
Agreed these are too general. Maybe change to GetMain and GetCurrent? |
| ||
Its more a fault of the documenter/highlighter. Documented Functions within a type are marked as keywords, but the highlighter doesnt respect type relationships. In the case of the thread module its actually TThread.Main() and TThread.Current() ( If you dont like this, i bet you must love Create ;) hehehe |
| ||
I thought Create was highlighted as a nice little extra and a small hint as to what I should name my constructor??? You mean it's not???? It's just some other function not highlighting properly??? WOW. My whole world has come crashing down. |
| ||
My whole world has come crashing down. So does mine realising BlitzMax implicitely converts from strings to ints and vice versa, even in SuperStrict mode. |
| ||
Is that a problem? What else do you want Print 5 to do? Make pandas jump across the screen? |
| ||
Is that a problem? I use the SuperStrict mode for being forced to maintain a certain amount of "computational transparency" in my code. Means not leaning into the BASIC syntaxic sugar too far, in favor of "more explicite" code. So this implicite, [Edit:] Of course opinions generally differ on the undocumented meaning of SuperStrict, which [Edit2:] Make pandas jump across the screen? Huh? |
| ||
From the docs Type conversions The following type conversions are performed automatically by BlitzMax when necessary - for example, when assigning an expression to a variable, or when passing an expression to a function: Source type Target type Integer Floating point, String Floating point Integer, String |
| ||
Maybe you could make the bracket determine the difference eg.main = 1 ' normal var Main( ' now it's a method |
| ||
I agree. I have a type field called current... |
| ||
Transparently calling ToString() methods behind the scene is a standard in managed language. Whenever something is used in a string and no string is provided, its expected that it next tries the ToString () method, which at least in object derivates is present by default and if not overriden will output the pointer. For numerics its handled "around the corner" but it still does the same. BM would be an epic fail if it would not behave that way independent of the mode. |