@@ -1599,11 +1599,11 @@ println('Your OS is ${current_os}.')
15991599> This section is valid when .v files are not in the project's root directory.
16001600
16011601Modules names in .v files, must match the name of their directory.
1602-
1603- A .v file ` ./abc/source.v ` must start with ` module abc ` . All .v files in this directory
1602+
1603+ A .v file ` ./abc/source.v ` must start with ` module abc ` . All .v files in this directory
16041604belong to the same module ` abc ` . They should also start with ` module abc ` .
16051605
1606- If you have ` abc/def/ ` , and .v files in both folders, you can ` import abc ` , but you will have
1606+ If you have ` abc/def/ ` , and .v files in both folders, you can ` import abc ` , but you will have
16071607to ` import abc.def ` too, to get to the symbols in the subfolder. It is independent.
16081608
16091609In ` module name ` statement, name never repeats directory's hierarchy, but only its directory.
@@ -1637,7 +1637,7 @@ fn main() {
16371637
16381638A function, located in ` abc/def/source.v ` , is called with ` def.func() ` , not ` abc.def.func() `
16391639
1640- This always implies a * single prefix* , whatever sub-module depth. This behavior flattens
1640+ This always implies a * single prefix* , whatever sub-module depth. This behavior flattens
16411641modules/sub-modules hierarchy. Should you have two modules with the same name in different
16421642directories, then you should use Module import aliasing (see below).
16431643
@@ -1963,7 +1963,7 @@ println(typ)
19631963```
19641964
19651965A match statement also can match the variant types of a ` sumtype ` . Note that
1966- in that case, the match is exhaustive, since all variant types are mentioned
1966+ in that case, the match is exhaustive, since all variant types are mentioned
19671967explicitly, so there is no need for an ` else{} ` branch.
19681968
19691969``` v nofmt
@@ -4730,12 +4730,12 @@ fn main() {
47304730
47314731### Difference Between Channels and Shared Objects
47324732
4733- ** Purpose** :
4733+ ** Purpose** :
47344734- Channels: Used for message passing between threads, ensuring safe communication.
47354735- Shared objects: Used for direct data sharing and modification between threads.
47364736
4737- ** Synchronization** :
4738- - Channels: Implicit (via channel operations)
4737+ ** Synchronization** :
4738+ - Channels: Implicit (via channel operations)
47394739- Shared objects: Explicit (via ` rlock ` /` lock ` blocks)
47404740
47414741## JSON
@@ -5836,20 +5836,20 @@ pub mut:
58365836
58375837Function/method deprecations:
58385838
5839- Functions are deprecated before they are finally removed to give users time to migrate their code.
5840- Adding a date is preferable in most cases. An immediate change, without a deprecation date, may be
5841- used for functions that are found to be conceptually broken and obsoleted by much better
5842- functionality. Other than that setting a date is advisable to grant users a grace period.
5839+ Functions are deprecated before they are finally removed to give users time to migrate their code.
5840+ Adding a date is preferable in most cases. An immediate change, without a deprecation date, may be
5841+ used for functions that are found to be conceptually broken and obsoleted by much better
5842+ functionality. Other than that setting a date is advisable to grant users a grace period.
58435843
5844- Deprecated functions cause warnings, which cause errors if built with ` -prod` . To avoid immediate
5845- CI breakage, it is advisable to set a future date, ahead of the date when the code is merged. This
5846- gives people who actively developed V projects, the chance to see the deprecation notice at least
5847- once and fix the uses. Setting a date in the next 30 days, assumes they would have compiled their
5844+ Deprecated functions cause warnings, which cause errors if built with ` -prod` . To avoid immediate
5845+ CI breakage, it is advisable to set a future date, ahead of the date when the code is merged. This
5846+ gives people who actively developed V projects, the chance to see the deprecation notice at least
5847+ once and fix the uses. Setting a date in the next 30 days, assumes they would have compiled their
58485848projects manually at least once, within that time. For small changes, this should be plenty
5849- of time. For complex changes, this time may need to be longer.
5849+ of time. For complex changes, this time may need to be longer.
58505850
5851- Different V projects and maintainers may reasonably choose different deprecation policies.
5852- Depending on the type and impact of the change, you may want to consult with them first, before
5851+ Different V projects and maintainers may reasonably choose different deprecation policies.
5852+ Depending on the type and impact of the change, you may want to consult with them first, before
58535853deprecating a function.
58545854
58555855
@@ -7710,7 +7710,7 @@ fn main() {
77107710 C.sqlite3_finalize(stmt)
77117711 println(' There are ${nr_users} users in the database.' )
77127712
7713- error_msg := &char(0 )
7713+ error_msg := &char(unsafe { nil } )
77147714 query_all_users := ' select * from users'
77157715 rc := C.sqlite3_exec(db, &char(query_all_users.str), my_callback, voidptr(7), &error_msg)
77167716 if rc != C.SQLITE_OK {
@@ -8193,7 +8193,7 @@ exists the file will be overridden. If you want to rebuild each time and not kee
81938193instead use ` # !/usr/bin/env -S v -raw-vsh-tmp-prefix tmp run` .
81948194
81958195Note: there is a small shell script ` cmd/tools/vrun` , that can be useful for systems, that have an
8196- env program (` /usr/bin/env` ), that still does not support an ` -S` option (like BusyBox).
8196+ env program (` /usr/bin/env` ), that still does not support an ` -S` option (like BusyBox).
81978197See https://github.com/vlang/v/blob/master/cmd/tools/vrun for more details.
81988198
81998199# Appendices
0 commit comments