From 9d7194099faefe8c6a925c8e321db85be0aae182 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Tue, 14 Sep 2021 11:54:56 -0700 Subject: [PATCH] Update rfcs/syntax-type-ascription-2.md --- rfcs/syntax-type-ascription-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/syntax-type-ascription-2.md b/rfcs/syntax-type-ascription-2.md index 82130f34..9d31939e 100644 --- a/rfcs/syntax-type-ascription-2.md +++ b/rfcs/syntax-type-ascription-2.md @@ -31,4 +31,4 @@ I propose that we change the meaning of the `::` operator to permit conversions ## Alternatives -We initially discussed allowing `::` to coerce anything to anything else, acting as a full bypass of the type system. We are not doing this because it is really just not that hard to implement: All we need to do is to succeed if unification works between the two types in either direction. +We initially discussed allowing `::` to coerce anything to anything else, acting as a full bypass of the type system. We are not doing this because it is really just not that hard to implement: All we need to do is to succeed if unification works between the two types in either direction. Additionally, requiring one type to be subtype of another catches mistakes when two types are completely unrelated, e.g. casting a `string` to a table will still produce an error when this proposal is in effect - this will make sure that `::` is as safe of a bypass as it can be in practice.