News for hackers. Stuff that matters.
Re:On moving code from C# to F# by Koshkin on Saturday March 19, 2016 @09:07PM (#11321298)
In many ways code is similar to math, and in math they mostly use one-letter identifiers. And there is a very good reason for that. I have seen texts where authors tried to make formulas more reader-friendly by replacing letters with words, but in that case they might as well have replaced formulas with prose...
Re:On moving code from C# to F# by smt88 on Saturday March 19, 2016 @09:11PM (#11321312)
Code has similarities to math, but it's not math.

function a(b) ... requires reading the whole function definition to understand what it does.

function createNewUser(userInfo) ... tells you exactly what it is and what it does. Especially if you're dealing with pure functions, it makes reading and understanding a code base much faster (and decreases the need for documentation).

Re:On moving code from C# to F# by Retra on Sunday March 20, 2016 @02:40AM (#11322046)
Math notation isn't as much concerned with implementation as it is the architecture.