you are viewing a single comment's thread
view the rest of the comments
[–] 13 points 1 month ago* (9 children)

I find the whole convention of denoting variables with %foo% weird. Like, delimit it at both ends? $foo is much more elegant and the character looks less weird

  • source
  • hideshow 9 child comments
  • [–] 13 points 1 month ago (2 children)

    It makes sense if you want to concatenate strings, which is probably pretty much what happens when you type that into the path input.

    This way, you could create a string like "D:/%appdata%/local/minecraft" Whereas without the trailing %, you would need a space to separate it from the text, which would result in "D:/Users/Public/AppData /local/minecraft".

    (i havent used windows in a while and those paths are from memory, they might be wrong)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (4 children)

    Technically $foo also delimits at both ends, the second character is just a newline or whitespace character. However with %foo% it is unambiguous where the variable begins and ends.

    Also I said newline or whitespace, what about special characters?

    Look at $foo+$bar am I adding two variables together? Is the first variable $foo or $foo+?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 1 month ago (3 children)

    i'm yet to see any language that has variables and '+' operator, while accepting also '+' in variable names at the same time. Same goes for basically every operator

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 1 month ago (2 children)

    Didn't JS do it? Or was it Lua? I don'5 remember but i am sure i saw a language that did some shit like that...

  • source
  • parent
  • hideshow 2 child comments