Content deleted Content added
BenAveling (talk | contribs) →polymorphic methods.: new section |
Blaisorblade (talk | contribs) Answer on →Quick sort example |
||
Line 35:
--[[User:DavidBiesack|DavidBiesack]] ([[User talk:DavidBiesack|talk]]) 22:17, 7 February 2008 (UTC)
: Just my opinion: the existing example is meant to be a direct translation of the Erlang example, and allowing the reader to compare the syntax on the same code is important. For me the current example is quite easy to understand and has a more "functional" style. And yep, the point is that in functional programs one line of code can express much more than in imperative ones, so they're too short for the imperative programmer to understand, but that's the coding style I've seen used by experienced programmers most of the time, so IMHO one just has to get used, and I'd keep this.
: I have studied Scheme and Haskell at a university course (and a bit more of Haskell), and I still remember that feeling (I mean, I never got really used to functional programming, unfortunately), so I'm arguing this even if I'm no expert. And all my previous contact with Scala was a paper with examples in Scala, explained to our class in less than one hour.
So, the only good point of your version is that it should be slightly faster since it uses <code>List.partition</code> and does just one pass on the list, but that's not relevant for an introductory article, IMHO.
--[[User:Blaisorblade|Blaisorblade]] ([[User talk:Blaisorblade|talk]]) 03:17, 7 January 2009 (UTC)
== polymorphic methods. ==
|