From 04ec0d86c8b43d1cca48adc937b3e596a10577a1 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Tue, 26 Mar 2024 11:36:11 +0000 Subject: Improve introduction of modules and imports Thanks @RyanBrewer317! --- .../chapter0_basics/lesson03_unqualified_imports/en.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/content/chapter0_basics/lesson03_unqualified_imports/en.html (limited to 'src/content/chapter0_basics/lesson03_unqualified_imports/en.html') diff --git a/src/content/chapter0_basics/lesson03_unqualified_imports/en.html b/src/content/chapter0_basics/lesson03_unqualified_imports/en.html new file mode 100644 index 0000000..ca83f2f --- /dev/null +++ b/src/content/chapter0_basics/lesson03_unqualified_imports/en.html @@ -0,0 +1,15 @@ +

+ Normally functions from other modules are used in a + qualified fashion, meaning the name used to refer the module goes + before function name with a dot between them. For example, + io.println("Hello!"). +

+

+ It is also possible to specify a list of functions to import from a module in + an unqualified fashion, meaning the function name can be used without + the module qualifier (the name and the dot) before it. +

+

+ Generally it is best to use qualified imports, as this makes it clear where + the function is defined, making the code easier to read. +

-- cgit v1.2.3