6 ms·
I'm a vocal convert. This approach helps me find bugs and repetition in my programs which makes my code shorter and faster as a result.
by geocar 9y ago
I'm a vocal convert.
This approach helps me find bugs and repetition in my programs which makes my code shorter and faster as a result.
- IshKebab 9y agoYou're joking right?
- modeless 9y agoI can see the argument for terseness. In fact I loathe how verbose Java is, I try to minimize LOC, and I enjoy using ?:. However, I don't think it's a good idea to use this extreme single-character, single-line style in languages not designed for it. If you really want this style, you should use APL or design your own language.
- tree_of_item 9y agoThey are using APL. This style is used in APL/J/K/etc implementations as well as the languages themselves.
- modeless 9y agoI don't think it's a good idea to import the style of a language into its implementation written in a different language; at least, not to this extent. When in Rome...
- mallaidh 9y agoIt's how Whitney's always done it: http://code.jsoftware.com/wiki/Essays/Incunabulum http://code.jsoftware.com/wiki/Essays/Incunabulum
- kazinator 9y agoBasically, this really wants to be using a custom preprocessor for a cleaner notation.
- modeless 9y agoThat would be a good step, but I don't think a preprocessor alone is enough to make this a good idea. You want good compiler error messages, static analysis tools, debuggers, code editors. You want a whole language.
- shitgoose 9y agowhat a gap. an abyss. inventor, and users of kdb explicitly and deliberately DO NOT WANT these things (static analysis tools, debuggers, code editors). nor they need it. language is so simple, there is no need for static analysis or code editors. (they compromised on error messages somewhat recently, though; now error messages are two words instead of one) personally, i disagree with them on debugger. would be nice to have one.
- deleted 9y ago[deleted]
- modeless 9y agoYou are right. There is an impassable abyss. I will never agree with anyone who believes that good error messages, analysis tools, or debuggers are not worth having.
- geocar 9y ago> I will never agree with anyone who believes that good error messages, analysis tools, or debuggers are not worth having. Even if they can do things you cannot do? What are you doing here if so freely admit you have a closed mind?
- deleted 9y ago[deleted]
- kazinator 9y agoThey have a whole language there, didn't you notice? Namely, this Q thing that the submission is about. What we're looking at here is some of its C implementation internals. They are using short identifiers and the C preprocessor to help with terseness. The justification is that this is "like APL". But there is enough C cruft there that it's not really like APL. A possibility would be to generate whatever code those C macros are generating, but with some other preprocessor which polishes the notation a little bit. Even if those analysis tools and debuggers were developed for Q, they likely wouldn't apply to this code.
- geocar 9y ago> I can see the argument for terseness The argument is that my programs are shorter and faster and more correct? > I don't think it's a good idea to use this extreme single-character, single-line style in languages not designed for it. You think if I need to write C, that I should do things that make my program larger and slower and less correct? That doesn't make any sense to me at all.
- kazinator 9y agoLonger identifiers don't make C programs larger. (Well, shared libraries have larger symbol tables, and unstripped executables have bigger debug info.) Using multiple lines and indentation doesn't change executable code.
- geocar 9y ago> Longer identifiers don't make C programs larger. They make the source code larger. That makes it harder to read.
- kazinator 9y agoI can't understand your comment; can you make greater use of one-letter words?
- shitgoose 9y agoz^n=x^n+y^n what can be greater than this?
- kazinator 9y agoI have a marvelous response for you, but even if I use nothing but one-letter words, it doesn't fit into this margin. Oops, I see we are devolving into Reddit. Alas, at least the end is near; recursion bottoms out at 4chan which is just one stack frame down.
- 9y ago