Henning Thielemann schrieb: >> in haskell-prime list there was a proposal to use '?' for such things: >> >> (1,2,?) >> >> only problem is what it's hard to define exactly where the lambda >> should arise:
the placeholder '?' becomes part of a new implicit identifier (that exceeds Haskell's identifier syntax). If we have: (,,) :: a -> b -> c -> (a, b, c) we get a bunch of new identifiers: (?,,) :: b -> c -> a -> (a, b, c) (,?,) :: a -> c -> b -> (a, b, c) (,,?) :: a -> b -> c -> (a, b, c) And maybe also: (?,?,) :: c -> a -> b -> (a, b, c) and so on. For infix ops this looks natural to me. >> >> (1,2,\x->x) I see no reason for this interpretation. >> (\x -> (1,2,x)) That should exactly be the implicit definition of my above implicit identifiers. > Yes that's a really evil problem that I already encountered in > mathematics. Some mathematicians like to write f(·) or even f(·-k) which > exhibits exactly the ambiguity you mention. Such placeholders are a really > bad idea. "f(?)" should not make sense in Haskell, since the parens do not belong to the identifier "f". (It's also not necessary: \ x -> f(x) = f) Cheers Christian _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
