diff --git a/beef-lang.org/content/corlib/_index.md b/beef-lang.org/content/corlib/_index.md index 5f8b3f0..262d09c 100644 --- a/beef-lang.org/content/corlib/_index.md +++ b/beef-lang.org/content/corlib/_index.md @@ -40,6 +40,6 @@ The following is a partial list of the funtionality provided by corlib. See the ## Multimedia libraries -The Beef IDE utilizes a windowing and multimedia library named Beefy2D. This library is only intended for use by the IDE and other internal Beef tools. This library is not documented or supported for this-party applications, and the API will change without regard for backwards compatibility. As such, other third-party libraries should be used by third-party applications. +The Beef IDE utilizes a windowing and multimedia library named Beefy2D. This library is only intended for use by the IDE and other internal Beef tools. This library is not documented or supported for third-party applications, and the API will change without regard for backwards compatibility. As such, other third-party libraries should be used by third-party applications. One example of a third-party multimedia library is SDL2, whose use is illustrated in the included Beef samples. diff --git a/beef-lang.org/content/language-guide/errors.md b/beef-lang.org/content/language-guide/errors.md index 5b938b5..2311ece 100644 --- a/beef-lang.org/content/language-guide/errors.md +++ b/beef-lang.org/content/language-guide/errors.md @@ -24,8 +24,7 @@ void Use() case .Err: Console.WriteLine("Failed"); } - /* This invokes an implicit conversion operator, which will be fatal at runtime if an error is returned */ - int newVal = GetMinusOne(i); + uint newVal = GetMinusOne(i); /* Result contains a special "ReturnValueDiscarded" method which is invoked to facilitate failing fatally on ignored returned errors here */ GetMinusOne(i); diff --git a/beef-lang.org/content/language-guide/memory.md b/beef-lang.org/content/language-guide/memory.md index 119ee0d..417c9aa 100644 --- a/beef-lang.org/content/language-guide/memory.md +++ b/beef-lang.org/content/language-guide/memory.md @@ -172,4 +172,4 @@ Object c = new:allok box 4.5f; // Explicitly boxed through a custom allocator 'a ``` ### Variants -The variant type `System.Variant` is an alternative to boxing. A variant is not an object type, and thus cannot perform dynamic interface dispatching, but a variant has the advantage that it can store small data types without allocation and it does not incur boxing code bloat. A variant can be converted into a heap-allocated boxed object via `Variant.GetBoxed`, but it will fail if the compiler hasn't generated an on-demand box type for the stored valuetype. Boxed type generation can be specifically requested via [reflection options](reflection.html). \ No newline at end of file +The variant type `System.Variant` is an alternative to boxing. A variant is not an object type, and thus cannot perform dynamic interface dispatching, but a variant has the advantage that it can store small data types without allocation and it does not incur boxing code bloat. A variant can be converted into a heap-allocated boxed object via `Variant.GetBoxed`, but it will fail if the compiler hasn't generated an on-demand box type for the stored valuetype. Boxed type generation can be specifically requested via [reflection options]({{< ref "reflection.md" >}}). \ No newline at end of file diff --git a/beef-lang.org/content/language-guide/operators.md b/beef-lang.org/content/language-guide/operators.md index f97f952..26eb115 100644 --- a/beef-lang.org/content/language-guide/operators.md +++ b/beef-lang.org/content/language-guide/operators.md @@ -138,7 +138,7 @@ struct Vector2 /* Binary + operator */ public static Vector2 operator+(Vector2 lhs, Vector2 rhs) { - return .(lhs.x, rhs.y); + return .(lhs.x + rhs.x, lhs.y + rhs.y); } /* Unary '-' operator */ diff --git a/beef-lang.org/content/language-guide/typerefs.md b/beef-lang.org/content/language-guide/typerefs.md index a852826..47924c5 100644 --- a/beef-lang.org/content/language-guide/typerefs.md +++ b/beef-lang.org/content/language-guide/typerefs.md @@ -6,4 +6,4 @@ title = "Type References" * Self - only valid within a definition of a class or struct, and refers to the defining type. If used within an interface, it refers to the implementing type. * var/let - used with type inference when creating variables, `var` is used to create a mutable variable, whereas `let` creates a const or read-only variable -* . - The `.` type is used with type inference, and refers to "the expected type". The most common use is to change an implicit conversion into an explicit conversion without specifying the type name. (ie: intVal = (.)floatVal) +* . - The `.` type is used with type inference, and refers to "the expected type". The most common use is to change an implicit conversion into an explicit conversion without specifying the type name. (ie: int intVal = (.)floatVal;)