compiler theory - Is there any language where names can include space characters? -
is there programming language allows names include white spaces ? (by names, intend variables, methods, field, etc.)
scala allow whitespace characters in identifier names (but possible, need surround identifiers pair of backticks).
example (executed @ scala repl):
welcome scala version 2.8.0.final (java hotspot(tm) client vm, java 1.6.0_22). type in expressions have them evaluated. type :help more information. scala> val `lol! works! :-d` = 4 lol! works! :-d: int = 4 scala> val `omg!!!` = 4 omg!!!: int = 4 scala> `omg!!!` + `lol! works! :-d` res0: int = 8
Comments
Post a Comment