2 ms·
The only practical use is that we can assign functions to a variable named λ Or define a type alias to that. On a more serious note, several languages have tha
by outworlder 12y ago
The only practical use is that we can assign functions to a variable named λ Or define a type alias to that.
On a more serious note, several languages have that, Ruby included.
- e12e 12y agoIt's not entirely useless to be able to use natural-language words/names for variables (if your language happen to not be English). For example when teaching kids how to code, why have proper spelling (eg: naming a "crow", "krake" rather than the proper "kråke") be an error? Just adds another barrier to learning. I think we're approaching the level of unicode penetration that this shouldn't really be much of a problem. Incidentally, I think this will be much more useful in Japan and possibly parts of China than in the parts of the world that speak an indo-european language (and therefore has an easier time learning English). But, those areas that doesn't speak native English is of course just a small market. /s
- hornetblack 12y agoI've only seen one thing actually use it in Go: func Polar(x complex128) (r, θ float64) { return Abs(x), Phase(x) } It seems to be good for documentation reasons.