Alice utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".

@LottieVixen It's a constructor from an sum data type. You want to have a type for let's say Strings and Int ? Haha, impossible in a strongly typed system where you know the type of each and every value. Let's say you had a container for this type, you stored an object and then some other function read one from this container. How should it use it ? As an Int or as a String ? See ? You can't. So instead, if you wanna consider «a String or an Int» (so the union of the sets corresponding to these two types), you have to build a new type StringOrInt, with to «constructors», kind of «tags» that wrap the value so you know what you have :

N of Int | S of String

Alice @Sasha

@LottieVixen Sorry I was AFK but I see you got some pretty neat answers. Still lost or is what I tried to explain clearer with what you understood in the meantime ?