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

As someone who is not exactly in the know about this subject: is there a cleaner way to write this stuff, or is that the usual way to do it? (I can write nasty Perl, but choose to write pretty Perl, because I like my job. What would an APL user do?)


By cleaner, do you mean more verbose? For example, the well known phrase for average in J is (average=: +/ % #). You would have no problem assigning names to the parts of the function, i.e. (sum=: +/), (divide=: %), (tally=: #) and defining the function as (average=: sum divide tally). It is tempting to learn J this way, but once you are familiar with the primitives, it makes more sense to just use them. You can pack a lot of thought into very few character, which is one of J's strengths.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: