Click here to Skip to main content
15,887,135 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Scala is the new golden child Pin
Rob Grainger14-Jun-16 22:28
Rob Grainger14-Jun-16 22:28 
GeneralRe: Scala is the new golden child Pin
Super Lloyd15-Jun-16 4:05
Super Lloyd15-Jun-16 4:05 
GeneralRe: Scala is the new golden child Pin
Sander Rossel15-Jun-16 11:04
professionalSander Rossel15-Jun-16 11:04 
GeneralRe: Scala is the new golden child Pin
Super Lloyd15-Jun-16 12:26
Super Lloyd15-Jun-16 12:26 
GeneralRe: Scala is the new golden child Pin
Rob Grainger15-Jun-16 23:07
Rob Grainger15-Jun-16 23:07 
GeneralRe: Scala is the new golden child Pin
Sander Rossel16-Jun-16 1:59
professionalSander Rossel16-Jun-16 1:59 
GeneralRe: Scala is the new golden child Pin
Rob Grainger16-Jun-16 5:00
Rob Grainger16-Jun-16 5:00 
GeneralRe: Scala is the new golden child Pin
Rob Grainger15-Jun-16 22:58
Rob Grainger15-Jun-16 22:58 
That, quite simply, is not function composition. It is simply wrapping one function in another.

LoggingVersion is not even a function, as it has side-effects (writing to console).

Function composition is much more concise, and pure:

descendingSort = (sort . reverse)


Where ".", in Haskell (the functional language I'm most familiar with) is composition.
No need to specify that arguments must be passed from one to another.

Because the two functions are pure, the compiler can perform quite aggressive optimisation and, if multiple cores are available, arrange for them to be distributed between them.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: Scala is the new golden child Pin
Super Lloyd16-Jun-16 5:18
Super Lloyd16-Jun-16 5:18 
GeneralRe: Scala is the new golden child Pin
Rob Grainger16-Jun-16 9:20
Rob Grainger16-Jun-16 9:20 
AnswerRe: Scala is the new golden child Pin
Super Lloyd14-Jun-16 13:02
Super Lloyd14-Jun-16 13:02 
AnswerRe: Scala is the new golden child Pin
Rob Grainger14-Jun-16 22:27
Rob Grainger14-Jun-16 22:27 
GeneralRe: Scala is the new golden child Pin
raddevus15-Jun-16 3:26
mvaraddevus15-Jun-16 3:26 
GeneralRe: Scala is the new golden child Pin
Kevin McFarlane16-Jun-16 1:31
Kevin McFarlane16-Jun-16 1:31 
GeneralRe: Scala is the new golden child Pin
Rob Grainger16-Jun-16 5:03
Rob Grainger16-Jun-16 5:03 
GeneralRe: Scala is the new golden child Pin
Kevin McFarlane16-Jun-16 5:12
Kevin McFarlane16-Jun-16 5:12 
GeneralRe: Scala is the new golden child Pin
Rob Grainger16-Jun-16 9:22
Rob Grainger16-Jun-16 9:22 
AnswerRe: Scala is the new golden child Pin
Kevin McFarlane15-Jun-16 0:19
Kevin McFarlane15-Jun-16 0:19 
GeneralWhat about me...? Pin
Chris Maunder15-Jun-16 8:38
cofounderChris Maunder15-Jun-16 8:38 
GeneralRe: What about me...? Pin
Kevin McFarlane16-Jun-16 1:44
Kevin McFarlane16-Jun-16 1:44 
GeneralRe: What about me...? Pin
Rob Grainger19-Jun-16 22:25
Rob Grainger19-Jun-16 22:25 
GeneralRe: What about me...? Pin
Kevin McFarlane19-Jun-16 22:39
Kevin McFarlane19-Jun-16 22:39 
NewsAmazing photo shows likely alien planet 1,200 light-years away Pin
Kent Sharkey14-Jun-16 11:36
staffKent Sharkey14-Jun-16 11:36 
GeneralRe: Amazing photo shows likely alien planet 1,200 light-years away Pin
enhzflep14-Jun-16 15:25
enhzflep14-Jun-16 15:25 
GeneralRe: Amazing photo shows likely alien planet 1,200 light-years away Pin
Bassam Abdul-Baki15-Jun-16 0:35
professionalBassam Abdul-Baki15-Jun-16 0:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.