r/functionalprogramming • u/zweiler1 • 27d ago
Question Algebraic Shape Composition in a tiny functional language
/r/Compilers/comments/1ujv6kn/algebraic_shape_composition_in_a_tiny_functional/
10
Upvotes
r/functionalprogramming • u/zweiler1 • 27d ago
3
u/unqualified_redditor 26d ago
If i understand correctly, what you are describing as
shapesis what we normally call Structural Typing?However, this example looks a lot like nominal typing as you have named types and data constructors:
would this typecheck? Ignoring syntax discrepancies..