Spin2 Method Defining/Calling
JonnyMac
Posts: 9,104
I am wondering if there is any support for defining and calling Spin2 methods that don't use arguments with an empty set of parenthesis (as other languages do). To me, this allows someone reading my code (which is mostly lowercase) to easily differentiate between a method name and a variable name.
Of course, Chip will make the final decision -- I'm hoping he supports the idea.
Of course, Chip will make the final decision -- I'm hoping he supports the idea.
Comments
Speaking of methods, can we get ? as a valid character to end a method name or would that mess something up?
So one can name a method that would usually be called something like "is_active" as just "active?", like in Ruby.
A small thing, but I think it's nice.
I think that should be pretty easy to support in fastspin too.
Please, let's not. ? is already used in the Spin2 conditional operator ( e.g. (x < y) ? x : y ) and in Spin1 for random numbers; adding yet another overloaded use for it seems dangerous.
That would be okay with me -- I'm very deliberate about style, so I would use it.
Thanks, Chihp.
LOL, you are a bit touchy about that. My first name is kurt and I have been called kirk and koot, and numerous other variations over the years, including having an n in place of the r on a letter from a dealership where I purchased a car. A bit annoying, and bothered me a bit as a kid, but I got over it pretty quick. It just did not seem worth worrying about.