From 80a340e4649bff9aff4466fbd61a076a04624e4c Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Fri, 26 Apr 2024 15:19:15 +0200 Subject: Increase consistency and readability a tiny bit --- .../chapter5_advanced_features/lesson00_opaque_types/en.html | 2 +- src/content/chapter5_advanced_features/lesson01_use/en.html | 5 ++--- src/content/chapter5_advanced_features/lesson04_panic/en.html | 2 +- .../chapter5_advanced_features/lesson05_let_assert/en.html | 6 +++--- .../lesson07_multi_target_externals/en.html | 8 ++++---- 5 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src/content/chapter5_advanced_features') diff --git a/src/content/chapter5_advanced_features/lesson00_opaque_types/en.html b/src/content/chapter5_advanced_features/lesson00_opaque_types/en.html index dbd362f..f0956fb 100644 --- a/src/content/chapter5_advanced_features/lesson00_opaque_types/en.html +++ b/src/content/chapter5_advanced_features/lesson00_opaque_types/en.html @@ -11,7 +11,7 @@ directly. This can be useful for ensuring that the type is used correctly.

- For example, this PositiveInt custom type is opaque, so if other + For example, this PositiveInt custom type is opaque. If other modules want to construct one they have to use the new function, which ensures that the integer is positive.

diff --git a/src/content/chapter5_advanced_features/lesson01_use/en.html b/src/content/chapter5_advanced_features/lesson01_use/en.html index b8e2641..d879aec 100644 --- a/src/content/chapter5_advanced_features/lesson01_use/en.html +++ b/src/content/chapter5_advanced_features/lesson01_use/en.html @@ -25,7 +25,6 @@

This is a very capable and useful feature, but excessive application of - use may result in code that is unclear otherwise, especially to - beginners. Often using the regular function call syntax will result in more - approachable code! + use may result in unclear code, especially to beginners. Usually + the regular function call syntax results in more approachable code!

diff --git a/src/content/chapter5_advanced_features/lesson04_panic/en.html b/src/content/chapter5_advanced_features/lesson04_panic/en.html index c54c217..07b1d48 100644 --- a/src/content/chapter5_advanced_features/lesson04_panic/en.html +++ b/src/content/chapter5_advanced_features/lesson04_panic/en.html @@ -1,6 +1,6 @@

The panic keyword is similar to the todo keyword, - but it is used to crash the program when the program has reached a point that + but it's used to crash the program when the program has reached a point that should never be reached.

diff --git a/src/content/chapter5_advanced_features/lesson05_let_assert/en.html b/src/content/chapter5_advanced_features/lesson05_let_assert/en.html index 29fd06c..0a6d10f 100644 --- a/src/content/chapter5_advanced_features/lesson05_let_assert/en.html +++ b/src/content/chapter5_advanced_features/lesson05_let_assert/en.html @@ -1,11 +1,11 @@

let assert is the final way to intentionally crash your Gleam - program. It is similar to the panic keyword in that it crashes + program. It's similar to the panic keyword in that it crashes when the program has reached a point that should never be reached.

- let assert is similar to let in that it is a way to - assign values to variables, but it is different in that the pattern can be + let assert is similar to let in that it's a way to + assign values to variables, but it's different in that the pattern can be partial. The pattern does not need to match every possible value of the type being assigned.

diff --git a/src/content/chapter5_advanced_features/lesson07_multi_target_externals/en.html b/src/content/chapter5_advanced_features/lesson07_multi_target_externals/en.html index 6e02d36..c755ac7 100644 --- a/src/content/chapter5_advanced_features/lesson07_multi_target_externals/en.html +++ b/src/content/chapter5_advanced_features/lesson07_multi_target_externals/en.html @@ -11,10 +11,10 @@ possible due to incompatibilities in how IO and concurreny works in Erlang and JavaScript. With Erlang concurrent IO is handled transparently by the runtime, while in JavaScript concurrent IO requires the use of promises or callbacks. - If your code uses the Erlang style it is typically not possible to implement - in JavaScript, while if callbacks are used then it won't be compatible with - most Gleam and Erlang code as it forces any code that calls the function to - also use callbacks. + If your code uses the Erlang style it's typically not possible to implement in + JavaScript, while if callbacks are used then it won't be compatible with most + Gleam and Erlang code as it forces any code that calls the function to also + use callbacks.

Libraries that make use of concurrent IO will typically have to decide whether -- cgit v1.2.3