Re:The Sierpinski triangle page to end most Sierpinski trian...
by 8_hours_ago on Tuesday October 08, 2013 @05:03PM
(#6517833)
That makes sense; I'm not the target audience. It was just a little off-putting to see some code and think "Whoa! That reminds me of Perl golf!!".
Re:The Sierpinski triangle page to end most Sierpinski trian...
by thinkpad20 on Wednesday October 09, 2013 @01:39PM
(#6522640)
This is one of the annoying things about Haskell code -- since many Haskell programmers come from math backgrounds, they tend to use very short variables, often one letter or a letter and a number, where a programmer would use a descriptive variable. Perhaps more annoyingly, as a result of this lineage, it's become part of the convention, so even those who come from a non-math background tend to use short, mathy variable names.
Re:The Sierpinski triangle page to end most Sierpinski trian...
by JonnieCache on Wednesday October 09, 2013 @08:21AM
(#6520780)
But why pick two letters, m and n, which are pronounced almost exactly the same way? That broke my brain so badly at uni on so many occasions, especially with non-native-speaking lecturers :(
Code by/for mathematicians is particularly ugly to a professional programmer. There is significant historical (pencil & paper) precedent for what single-letter variables represent in a given context. For a mathematician, ConstantArray[0, {m,n}] reads more cleanly than ConstantArray[0, {cols,rows}].
Similarly, seeing variables like p1, p2, p3 is off-putting to me as a programmer, but I still immediately recognize them as 3 arbitrary points in a triangle.