Re:Please do not attempt to simplify this code
by karmasimida on Thursday December 27, 2018 @09:25PM
(#18774426)
FP advocates strike me the odd way that they trying to argue FP can reduce the intrinsic complexity of the problem itself, but they have no proof of it, or their 'proovies' are essentially faith.
[ Parent
| on HN ]
Re:Please do not attempt to simplify this code
by StreamBright on Friday December 28, 2018 @06:03AM
(#18776115)
This is not true at all.
This:
#include<stdio.h>
main()
{
int sum; int x; sum=0;
for(x=1;x<=50;++x)
{
sum = sum + x;
}
printf(" 1+2+...+50=%d\n",sum);
}
Is more cognitive load and error prone than this: (println (reduce + (range 1 50)))
This is mostly what experienced FP advocates tell you. Btw. you can transpile the latter to the former.