3 ms·
sigh You are trying to equate mathematical functions and software functions (i.e. co-routines). They are not the same thing. A co-routine does not have a doma
by hnisstillstupid 12y ago
sigh
You are trying to equate mathematical functions and software functions (i.e. co-routines). They are not the same thing.
A co-routine does not have a domain and co-domain. When we declare a function type
F(T_1, T_2) T_3, T_4, ... {}
we are saying that a co-routine begins in a pair type (T_1, T_2), it ends in a function type (return) mapping the T_3 and T_4 values to a pair type (Pointer, Data) for both values (as a simplified view).
> So, here, foo's return type really is "bottom".
No, the return co-routine is a routine that finishes successfully but "emits" no value. There are no bottom or unit types anywhere in this. Sorry.
- munificent 12y agoI think you're trying to clarify something here, but I can't make heads or tails of what you're saying. The article uses "⊥" in one sentence and "Void" in the next without clarifying if "Void" is synonymous with bottom or if a new concept is being introduced. Either way, my point was that programmers coming from the large slew of Algol68-derived languages will see "void" here and likely think it has something to do with the "void" they're familiar with when it does not. As far as I know, in practice, "void" in C, Java, et. al. works more like the unit type than a bottom type and/or this not-very-well-defined-by-the-article void type. If I'm wrong, I'd like to know more, but preferably in language a little more familiar to a working programmer than describing software functions as "co-routines which do not have a domain and co-domain".