Special syntax instead of "get(variable)"

  • Hi Klaus,

    I see a lot of people (including me) making the mistake that I pass the variable name to an action instead of the content of the variable. That's the difference between "action(variable)" and "action(get(variable))" *smile*

    I know "get" has been introduced after the first release but nevertheless I still don't get used to that syntax because its so different compared to other programming languages (I am software developer). So, I came accross the idea whether you could introduce a special syntax for "content of a variable". My suggestion is to prefix a variable name with "%" or a "$".
    The "%" would go in line with the parameters of a action but would mean variables are not allowed to start with numbers. If the "%" isn't a good choice I vote for "$".

    I would love to write code like this: "action($variable)" instead of "action(get(variable))".

    What do you think?

    Michael

  • i would like to second gomi42's suggestion!

    i think it would also be nice to use this mechanism to unify the mixed use of variables by now where they're handled with and without the get() statement.

    as i'm programming a lot in php i think the consistent use of $ when dealing with variables, could do this job.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!