Why dashes?
- More readable than underscores.
- JS has its own variable naming style (camelCase), which obviously sucks in readability.
- Vars with dashes are invalid in js, so if we'll compile it with mangling, it won't violate js naming style.
Cons:
- It would add more complexity
- will be prohibited from using as OP without indenation like a - b (which is good IMO).
Examples
add-user = (name, age) -> ...
remove-users-with-age = (age) ->
remove-user user for user in users when user.age is age
add-users = (users) ->
add-user user for user in users
class Thread-post
addUser ...
removeUsersWithAge ...
addUsers ...
ThreadPost ...
Examples
Clojure. Pretty readable.
Why dashes?
Cons:
-will be prohibited from using as OP without indenation likea - b(which is good IMO).Examples
Examples
Clojure. Pretty readable.