Post
by iluvseq » Mon Apr 19, 2004 7:05 pm
I accept it, and thats fine.
However, I also found /varset foo to be counter intuative.
You must forgive me, I've been programming Perl and PHP for years.
A variable starts with some character ($ in both of those languages) ALL THE TIME.
It's never "plaintext for assignment, special start character for usage"
ie: it's $foo = 1; print $foo. Not "foo = 1; print $foo"
I am constantly haveing to fix bugs in my macros (my bugs) cause I do /varset @foo
Plazmic: I understand completely that the underlying mechanism is a numeric comparison. In every language, as you say, it all boils down to numeric comparisons. However, thats behind the scenes.
For the coder using a language (not the developer creating the parser/executor for the language) the whole concept of "if a variable is defined, it's true" holds true for both strings and numeric variable types (with "" and 0 being special cases of "defined, yet false")
Since you support this notation for numeric types, it follows to reason that it would be supported for string types as well. I can accept that it won't be, however, I don't really understand WHY it wouldn't be, other than to think that it might add some complexity to the parser.
It is well within your rights to opt for a simpler parser, yet a more complex user experience if you wish. Hell, it might even make it faster, since your parser doesn't have to pay attention to things like the "quote state"
However, you've got to admit that having "two syntaxes" for variables is a tad odd. (ie: @MyVar is a variable when you want the value, MyVar is a variable when you are assigning to it)
I had (incorrectly) assumed that this counter-intuative kludge was going away with the conversion to ${} style variables.
Again, I'm not saying it's wrong. A simpler parser probably makes sense given that we want things to execute as balls out fast as we can.
Anyway, I hope that you can see that I wasn't trying to piss anyone off. I made an invalid assumption regarding /newif in my intial "bug" report that Lax locked. If you are objective I think you can see that my assumption is certainly reasonable and logical, especially given the "way it's done" in languages like Perl or PHP. When Lax was rude to me right off the bat for no reason, I tried to stay reasonable, but since he didn't give me much to go on other than a slammed door in my face.
I'm honestly trying to do two things here:
A) learn macroquest so I can write better scripts
B) improve macroquest
Thank you for taking my comments in that spirit, and please, try not to be so quick to assume that I am just another newb pulling things out of my ass. I really don't think my posts reflect that, but who knows, maybe I really am a moron.