kolodny / wavy

use ~ in require and import calls
378 stars 20 forks source link

~ is laden with existing connotations #5

Closed jimbocoder closed 8 years ago

jimbocoder commented 8 years ago

Because the ~ symbol already has a well understood meaning in the context of filesystem paths, it can easily be misleading and a very confusing choice. I'd suggest almost anything other than ~ for this project, in particular noting that it doesn't need to be a single character.

kolodny commented 8 years ago

That was the reason for using ~ as this is used as the "home" location. Using something like app or root is misleading as people may think that's an actual package. ~ is an invalid npm package name

dnjstrom commented 8 years ago

I just found out about this plugin and thinks it's a pretty awesome solution, but I have to agree that using the ~-sign is a bit misleading. If one is not already familiar with wavy and the particulars of NPM the natural conclusion is that ~ represents the home directory. After all, the require function takes what for all intents and purposes looks like a normal path-string. I think the ':'-sign might be a great alternative as that is already used by git to denote the project root (i.e. git add :/ to add all files in the current repository no matter the current directory). As the meaning is more similar to what we want to achieve here I think that would adhere better to the principle of least astonishment.

kolodny commented 8 years ago

: is an invalid filename so it can't be a folder in node_modules

dnjstrom commented 8 years ago

Ah, that's too bad! Regardless, thanks for addressing my idea and for having built wavy! :)