4 ms·
The only style there that is actually used by a person is the Bourne style. There are other styles that people develop for themselves, for example there was som
by dan-robertson 8y ago
The only style there that is actually used by a person is the Bourne style. There are other styles that people develop for themselves, for example there was some Haskell program posted to a mailing list with a warning about personal style. This defines:
(.) :: a -> (a -> b) -> b
x.f = f x
And then the author can write e.g.
x.length
Instead of
length x
I think this is really quite a natural operator (and other languages support it, eg in F# it is pronounced |> and closure has something like it with ->)
- ulucs 8y agoneat, I think D has language level support for this too
- chris_mc 8y agoThat's basically uniform function call syntax. D and Nim use it and a few others.
- aeneasmackenzie 8y agoThis operator is (&) in Haskell these days.