3 ms·
500 lines of what? 500 lines of APL / J / Q is enormous; 500 lines of Haskell / Scala / Ruby is quite a mouthful, 500 lines of Java or C is rather moderate, an
by nine_k 10y ago
500 lines of what? 500 lines of APL / J / Q is enormous; 500 lines of Haskell / Scala / Ruby is quite a mouthful, 500 lines of Java or C is rather moderate, and 500 lines of assembly is precious little.
Also, since a line of code can contain zero or more statements, something like cyclomatic complexity, or just statement count, could give a better measure.
(Edited: fought autocorrect.)
- JoeAltmaier 10y agoGood point. Tangentially, assembly language is extremely modal. Logic can be coded in almost exactly the same number of lines as any high-level language. Compare-and-branch is a single line as in any language. But compositing data (building argument lists or structured data) can be exhaustingly wordy. A single call with 2 or 3 arguments can take a hundred lines of assembler. So it all depends.
- userbinator 10y agoAnd even Asm, while traditionally one-instruction-per-line, can have macros and some syntaxes like RosAsm's allow more than one instruction per line: https://upload.wikimedia.org/wikipedia/commons/5/50/RosAsmTreeView.png https://upload.wikimedia.org/wikipedia/commons/5/50/RosAsmTr...
- chrisseaton 10y agoWhat on earth do you think this is? It's not a research hypothesis. Nothing is being measured. It's a clever way to get people to show that ideas many people think are beyond their understanding can be illustrated in just a few lines of code. 'Cyclomatic Complexity of N or Less' would work against that goal as it says nothing about length and is hard to explain. What a mindless criticism of a worthwhile project.
- nine_k 10y agoI'm actually all for books like this.
- agumonkey 10y agoOh how I'd like a compilation of 500L APL programs.
- AstroJetson 10y agoI worked on a billing system that was written in APL, maybe 60 functions at 5-10 lines each. The corresponding manuals (one development, one user guide) were both over 300 pages. Maybe some of the APL mavens can do the existing examples in APL and explain them. The write density of APL is pretty amazing. Depending on what you are doing a clear winner at code golf.
- agumonkey 10y agoI guess that system could deserve a 4 year cursus to reach understanding. APL breeds fields.