on master help sign in
Merge branch 'dev' of github.com:elm-lang/elm-compiler into dev
commitab16fc8d28da5c3bc9e0f0e55f8657e7da3a2c2d authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 5 Sep 2017, 13:08 (9 years ago) parent59bd3feb49be28
2 files changed+4−4
hints/import-cycles.md+2−2 hints/port-modules.md+2−2
hints/import-cycles.md+2−2
@@ -29,7 +29,7 @@ Notice that to compile `Comment` we need to `import User`. And notice that to co
2929
3030Now this is *possible* if the compiler figures out any module cycles and puts them all in one big file to compile them together. That seems fine in our small example, but imagine we have a cycle of 20 modules. If you change *one* of them, you must now recompile *all* of them. In a large code base, this causes extremely long compile times. It is also very hard to disentangle them in practice, so you just end up with slow builds. That is your life now.
3131
32−The thing is that you can always write the code *without* cycles by shuffling declarations around, and the resulting code is ofter much clearer.
32+The thing is that you can always write the code *without* cycles by shuffling declarations around, and the resulting code is often much clearer.
3333
3434
3535# Breaking Cycles
@@ -55,7 +55,7 @@ type alias User =
5555 }
5656```
5757
58−Notice that the `Comment` type alias is defined in terms of the `User` type alias and vice versa. Having recursive type aliases like this does now work! That problem is described in depth [here](recursive-alias.md), but the quick takeaway is that one `type alias` needs to become a `type` to break the recursion. So let’s try again:
58+Notice that the `Comment` type alias is defined in terms of the `User` type alias and vice versa. Having recursive type aliases like this does not work! That problem is described in depth [here](recursive-alias.md), but the quick takeaway is that one `type alias` needs to become a `type` to break the recursion. So let’s try again:
5959
6060```elm
6161module BadCombination2 exposing (..)
hints/port-modules.md+2−2
@@ -18,7 +18,7 @@ Imagine you install a new package that claims to support `localStorage`. You get
1818
1919Okay, now you need to hook up some JavaScript code. Is that JS file in the Elm package? Or is it on `npm`? Wait, what version on `npm` though? And is this patch version going to work as well? Also, how does this file fit into my build process? And assuming we get through all that, maybe the `port` has the same name as one of the ports in your project. Or it clashes with a `port` name in another package.
2020
21−**Suddenly adding dependencies is much more complicated and risky!** An experienced developer would always check for ports up front, spending a bunch of time manually classifying unacceptable packages. Most people would not know to do that and learn all the pitfalls through personal experience, ultimately spending even *more* time than the person who defensively checks to avoid thes issues.
21+**Suddenly adding dependencies is much more complicated and risky!** An experienced developer would always check for ports up front, spending a bunch of time manually classifying unacceptable packages. Most people would not know to do that and learn all the pitfalls through personal experience, ultimately spending even *more* time than the person who defensively checks to avoid these issues.
2222
2323So “ports in packages” would impose an enormous cost on application developers, and in the end, we would have a less reliable package ecosystem overall.
2424
@@ -29,4 +29,4 @@ Our wager with the Elm package ecosystem is that it is better to get a package *
2929
3030Now this may not be the right choice for your particular project, and that is okay! We will be expanding our core libraries over time, as explained [here](https://github.com/elm-lang/projects/blob/master/roadmap.md#where-is-the-localstorage-package), and we hope you will circle back later to see if Elm has grown into a better fit!
3131
32−If you have more questions about this choice or what it means for your application, please come ask in [the Elm slack](http://elmlang.herokuapp.com/). Folks are friendly and happy to help out! Chances are that a `port` in your application will work great for your case once you learn more about how they are meant to be used.
32+If you have more questions about this choice or what it means for your application, please come ask in [the Elm slack](http://elmlang.herokuapp.com/). Folks are friendly and happy to help out! Chances are that a `port` in your application will work great for your case once you learn more about how they are meant to be used.