From a0cc7270b3bbbf557e1673384779c55c0cea59f5 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Fri, 3 May 2024 00:22:39 -0400 Subject: [PATCH 1/2] Update faq.md - flip "convenience" and "confusion" in "is outweighed by" clause. --- content/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq.md b/content/docs/faq.md index af41baba..354f6741 100644 --- a/content/docs/faq.md +++ b/content/docs/faq.md @@ -209,7 +209,7 @@ Character literals such as `'g'`, `'芋'`, and `'\u0123'` are all untyped runes, Implicit conversions complicate things and would be difficult to make consistent across architectures. To increase portability and to simplify the language, Odin uses explicit conversion. -In C, the confusion caused by implicit numeric type conversions is outweighed by the convenience it provides. There are many rules in C which are not at all obvious nor simple to the reader of the code (e.g. is this expression unsigned does this expression over/under-flow? etc). +In C, the convenience provided by implicit numeric type conversions is outweighed by the confusion it causes. There are many rules in C which are not at all obvious nor simple to the reader of the code (e.g. is this expression unsigned does this expression over/under-flow? etc). The exceptions to this are that: all pointer types can automatically coerce to a `rawptr`, and untyped constants can be converted to a type - if that conversion is valid. The constant system does reduce a lot of the issues regarding types as "numbers just work"; there is no need for literal suffixes like in C. From a8b11f5f2e9f796cc2a3726051fc79687d4685c2 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Fri, 3 May 2024 00:31:37 -0400 Subject: [PATCH 2/2] Update faq.md - grammatical number fix & punctuation to separate phrases --- content/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq.md b/content/docs/faq.md index 354f6741..0be0ef17 100644 --- a/content/docs/faq.md +++ b/content/docs/faq.md @@ -209,7 +209,7 @@ Character literals such as `'g'`, `'芋'`, and `'\u0123'` are all untyped runes, Implicit conversions complicate things and would be difficult to make consistent across architectures. To increase portability and to simplify the language, Odin uses explicit conversion. -In C, the convenience provided by implicit numeric type conversions is outweighed by the confusion it causes. There are many rules in C which are not at all obvious nor simple to the reader of the code (e.g. is this expression unsigned does this expression over/under-flow? etc). +In C, the convenience provided by implicit numeric type conversion is outweighed by the confusion it causes. There are many rules in C which are not at all obvious nor simple to the reader of the code (e.g. is this expression unsigned? does this expression over/under-flow? etc). The exceptions to this are that: all pointer types can automatically coerce to a `rawptr`, and untyped constants can be converted to a type - if that conversion is valid. The constant system does reduce a lot of the issues regarding types as "numbers just work"; there is no need for literal suffixes like in C.