From 10be389e96975e4147adb2a309b4fbdd65e36701 Mon Sep 17 00:00:00 2001 From: SolarScuffle-Bot <93509782+SolarScuffle-Bot@users.noreply.github.com> Date: Wed, 3 Jan 2024 23:01:00 -1000 Subject: [PATCH] Update polymorphic-table-types.md --- docs/polymorphic-table-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/polymorphic-table-types.md b/docs/polymorphic-table-types.md index 9b043de..e8c8312 100644 --- a/docs/polymorphic-table-types.md +++ b/docs/polymorphic-table-types.md @@ -6,7 +6,7 @@ We propose implementing polymorphic tables of the form `{ [F] : G }` an ## Motivation -The goal of this RFC is furthering type-safety and type-representation, especially in niche or performance-critical applications. polymorphic functions exist already in the form `(F) -> G`, where `T` is inferred at the call site, with similar applications. +The goal of this RFC is furthering type-safety and type-representation, especially in niche or performance-critical applications. Polymorphic Functions exist already in the form `(F) -> G`, where `T` is inferred at the call site, with similar applications. At a type level, luau functions and tables are homomorphic as type mappings. One can view a table as a function mapping its keys to its values, or a function as a table with inputs as keys and outputs as values. This change resolves the hole left behind implementing polymorphic functions while excluding polymorphic tables, forcing type-safe applications to prefer functions over tables as maps.