I think many may take your response as a bit off-the-cuff, but I share this sentiment. You could even go so far as to write the longest C program you could dream of to solve it, then simply feed it into
tr -d '\n'
and call it one line! Again, many will find this pedantic and unsatisfactory but programmers should really be more precise in what they mean by lines of code.
What I think most people are really referring to is information content. To achieve the same program in shorter length, the rest of the information has to lie somewhere else (in the scala implementation or nqeensolver.h). We can increase the density of the information needed to specify a program, but not decrease it.
I actually just wrote something about this concept yesterday:
Comments
Here is my 2 line solution to n-queen.
#include <nqueensolver.h>
int main(){int n=5;solve(n);}
Please include the binaries for nqueen solver when compiling and running.
The point I am trying to make is that, in such a high label language like scala, this kind of claim sounds foolish.
I think many may take your response as a bit off-the-cuff, but I share this sentiment. You could even go so far as to write the longest C program you could dream of to solve it, then simply feed it into
and call it one line! Again, many will find this pedantic and unsatisfactory but programmers should really be more precise in what they mean by lines of code.What I think most people are really referring to is information content. To achieve the same program in shorter length, the rest of the information has to lie somewhere else (in the scala implementation or nqeensolver.h). We can increase the density of the information needed to specify a program, but not decrease it.
I actually just wrote something about this concept yesterday:
https://aconz2.github.io/programming/2016/04/09/power_of_pl....