{"issue":{"milestone":null,"title":"Variable name with any character and whitespace","created_at":"2011-12-28T16:38:59Z","user":{"login":"johnnywengluu","id":445841,"url":"https://api.github.com/users/johnnywengluu","gravatar_id":"d084e44bfe1566d87abf80d1f6c0b8a4","avatar_url":"https://secure.gravatar.com/avatar/d084e44bfe1566d87abf80d1f6c0b8a4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-29T21:05:00Z","state":"open","labels":[],"id":2672651,"closed_at":null,"html_url":"https://github.com/jashkenas/coffee-script/issues/1982","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"These features kinda have something in common so I just put them in the same request:\r\n\r\nFeature 1:\r\n\r\nOne feature I would like to see is the ability to use whatever character as name eg.\r\n\r\n    ƒ = (name) -> ...\r\n\r\n    ƒ \"load models for view\"\r\n\r\nor\r\n\r\n    π = 3.14\r\n\r\nThis is already possible (also means that it's simple to do in JS) if you are doing like this:\r\n\r\n    o =\r\n      \"ƒ\": (name) -> ...\r\n\r\n    o[\"ƒ\"] \"load models for view\"\r\n\r\nIf this was a built in feature we wouldn't have to declare it as an object method and also don't have to call it with brackets.\r\n\r\nWhy should $ be allowed and not ß Ω £ π and others.\r\n\r\nI can't think of any drawback with this feature since it's already possible, with more code. CS would just make this simpler so the code gets prettier.\r\n\r\nFeature 2:\r\n\r\nAnother thing I would like to see is acceptance of whitespace in variable names eg:\r\n\r\n    `create a new app` = (app) -> ...\r\n\r\n    `create a new app` \"test\"\r\n\r\n    o =\r\n      \"create a new app\": (app) ->\r\n    \r\n    o.`create a new app` app\r\n\r\nThese are just suggestions borrowed from Ruby where it runs a shell command:\r\n\r\n    `echo hello`\r\n\r\nAlso Neo4j is using them to allow attributes with whitespace:\r\n\r\n    person.`first name`\r\n\r\nWhy I think it's a good suggestion.\r\n\r\nI know it's an old habit to use camelCased variable names but I just don't know why we still have to do that. It collides with literate programming. Also being forced to hit SHIFT for each word just doesn't make sense, not to mention that this just makes the whole program _much_ more fun to read. Just read it like you read a book. Why suddenly reading sentences in camelCase or preventing variable names to be too long (thus unreadable)?\r\n\r\nI could only imagine that this would open a new door for literate programming style in CS. No need to declare a function and have a comment above it explaining what it does. The code itself should be the documentation.\r\n\r\nAnd as mentioned you can already have whitespace but a lot of programmers don't want to do something like:\r\n\r\n    o[\"create a new app\"] app\r\n\r\n    o[\"load view for page\"] = (page) -> ...\r\n\r\nwhy everyone still prefers camelCasing the name.\r\n\r\nJavascript is very flexible under the hood but it's not smart enough to allow users to use the cool features with ease. \"Smell but don't taste\".\r\n\r\nFor me this is something CS could take care of very easily and would make everyone love to have descriptive names thus indirectly making the whole app more of a literate program, for free.","number":1982,"url":"https://api.github.com/repos/jashkenas/coffee-script/issues/1982","comments":3,"assignee":null},"comment":{"created_at":"2011-12-29T21:05:00Z","user":{"login":"johnnywengluu","id":445841,"url":"https://api.github.com/users/johnnywengluu","gravatar_id":"d084e44bfe1566d87abf80d1f6c0b8a4","avatar_url":"https://secure.gravatar.com/avatar/d084e44bfe1566d87abf80d1f6c0b8a4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-29T21:05:00Z","id":3305152,"body":"Damn what a miss. I must have tested it on the node REPL and thought it was coffee.\r\n\r\n","url":"https://api.github.com/repos/jashkenas/coffee-script/issues/comments/3305152"},"action":"created"}