Open glyph opened 10 years ago
I'm not sure how functional Bagel is going to be, but in functional languages, it's not uncommon to see code that looks like
val d = fn : (real -> real) -> real -> real
Compared to
val d = fn : (real returns real) returns real returns real
I do like your idea though, just trying to think how it'd look as a function type signature
Bagel is not going to be that function, chains of ->
will be uncommon.
This does raise the question of how one declares an argument of a particular signature though. What does a higher-order function look like in Bagel?
You're asking what the "type" of a function is?
On Mon, Oct 20, 2014 at 11:52 AM, Glyph notifications@github.com wrote:
This does raise the question of how one declares an argument of a particular signature though. What does a higher-order function look like in Bagel?
— Reply to this email directly or view it on GitHub https://github.com/alex/bagel/issues/53#issuecomment-59820124.
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
Yes, I guess, although only in the context of what the literal spelling of a signature for a callable parameter passed to a function would look like.
Let's say it's Function[*args, returns=...]
(I don't have a clue wha tthe
right answer is)
On Mon, Oct 20, 2014 at 3:17 PM, Glyph notifications@github.com wrote:
Yes, I guess, although only in the context of what the literal spelling of a signature for a callable parameter passed to a function would look like.
— Reply to this email directly or view it on GitHub https://github.com/alex/bagel/issues/53#issuecomment-59849132.
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
When considering #52, I realized that
->
is unnecessarily difficult to pronounce. It bothers me because it obviously wants to be "→" but isn't because of limitations on keyboards rather than comprehensibility. Bagel Fuhmpt could of course format this as an arrow, which would be an improvement, but better yet, I think, would be to changeto
since that is how I would pronounce the sigil; what you are saying about the signature is that it returns
Point
, so... why not just spell that out with a word?