Re: Keyword Arguments
Jeremy Tregunna <[email protected]> Fri, 15 Jun 2012 06:05:19 -0600
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
On Friday, 15 June, 2012 at 3:10 AM, Friedrich Dominicus wrote: > > > That leaves us with the question: Should we be making it easier to implement > > bad designs than good ones? > Isn't it in the end about readability? And shouldn't the intentions be > visible? Let's takke the sort example > > list(1,3,2) sort(<) or the like > or maybe > list(1,-3,-2,2,50) sort(<) filter (> 0) > > fine. Whereever do you find such kind of comparison without the stuff > that is compared? > > Have anyone ever seen a lonely < in maths? I can't remember having seen > that. Can you ever remember seeing an implementation of a UI (any UI) rendering function in maths? Software lives at the intersection of art and science. Programming is not math. > So what is more readable and understandable > > the above or > > list (1,3,2) sort([:a :b| a < b]) filter([:other| other > 0]) the above. > > Yes i know it's not Io bu I guess you still "understand" it. What > feel's more natural? To me, the first form feels more natural; and I started out with Smalltalk even ;) > or would you prefer > > comparator := MyComparator on: a and: b > myFiler := MyFilter compareAgainst: 0. > > list(1,3,2) sort(comparator) filter(myFilter) Not at all. If I can have it, I prefer the first form. Regards, Jeremy Tregunna