I have seen syntactic sugar like that in Scala. It can be very powerful but at the same time very confusing when you need to fix a bug since you have the mental overhead of the dsl to actual code to worry about as well.
fre 2 juni 2017 kl 16:16 skrev <gary.willoug...@victoriaplumb.com>: > Right, now show me the contents of the *average wage by country *function! > It's not going to be one line or as readable is it?!?! > > > On Friday, 2 June 2017 14:26:47 UTC+1, Egon wrote: >> >> On Friday, 2 June 2017 15:59:41 UTC+3, gary.wi...@victoriaplumb.com >> wrote: >>> >>> Generics enable more than just replacing loops. For example, they can >>> enable libraries of generic algorithms to be used with any type of array. >>> Here's an example: >>> >>> foo := GetArray() >>> result := foo.Take(10).map(...).Sort(...).Reduce(...) >>> >> >> Why stop there? It also could be: >> >> *result := average wage by country* >> >> This is much more readable than the map/reduce stuff. >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.