Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In this case, the "equivalent" code isn't a line that produces the same result, but is instead a line that illustrates the dynamic culture of the given language's evolution.

For Arc, right now, practically every line is an equivalent.



Well okay let me elaborate on my question.

pg has stated that code brevity is one of the main design goals of arc. But what is pretty obvious is that code brevity is not the only consideration. It is desirable to be able to write very short code, but it should be readable as well. If you write very short code that is difficult for other people to read, that is bad enough. If you write very short code that ends up being difficult even for yourself to read -- then we have a problem.

The above ruby code snippet is a great example of code where reducing the length not only did not reduce readability, but actually increased it. I know some people have complained about it being obfuscated on this board. But to me, and I am sure to a number of other people on this board, it was easy to understand, intuitive even.

so .. in arc, what would be a similar way to create a list of numbers from 1 to 100, and to evaluate the sum of that list?


That question is somewhat interesting just a little off-topic in this thread.

In Arc, that line would be:

   (reduce + (range 1 100))
which is nice, but not much different from Scheme. Pretty readable.


Thank you, exactly!!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: