Re:Code Length Measured in 14 Languages
by narrator on Wednesday November 14, 2012 @01:05PM
(#4784539)
No APL? That language always wins on code golf. You wouldn't want to maintain it though. However it absolutely shines if you're on a 110 baud teletype and have to wait for each character to print. /s
[ Parent
| on HN ]
Re:Code Length Measured in 14 Languages
by Locke1689 on Wednesday November 14, 2012 @01:15PM
(#4784594)
This is truly an apt criticism. There are a lot of J solutions for problems which Mathematica also has a solution, but for some reason it wasn't included.
Re:Code Length Measured in 14 Languages
by JonMcLoone on Wednesday November 14, 2012 @03:10PM
(#4785260)
I quickly ran the code on J and got ratios of lines:0.5, characters: 0.74, tokens:0.5, over 432 comparisons IE J is about half the length of Mathematica code.
APL, has ratios of between 1 and 2 (IE a little longer than Mathematica, but over only 32 comparisons which is too few to be reliable).
Julia was also asked about, but there are only 9 comparisons which is certainly too few to be meaningful.