3 ms·
Lisp is interesting because it always has a first mover advantage in any field, i.e. I can code up something that does 80% of what I want in 10% of the time of
by konjin 6y ago
Lisp is interesting because it always has a first mover advantage in any field, i.e. I can code up something that does 80% of what I want in 10% of the time of any other language. Cobol's only use is that it's entrenched.
Which is why I used the vatican comparison.
- kazinator 6y agoIn a nutshell, Cobol fails to inspire throngs of youngsters to write "toy Cobol" implementations. It is also relatively rare for new languages cite Cobol as an inspiration for any of their features. Cobol has a feature whereby dissimilar structures can be assigned. The structure members which have the same names are identified between the structures and the data is moved accordingly. Or something like that. A programming language which has such a thing could claim to have had that inspired by Cobol. If I ever add that to TXR Lisp, I will be sure to drop a Cobol reference into the documentation. I might have learned about this via Knuth; I think there is a mention of it in some passage in TAOCP.
- gumby 6y ago> Cobol has a feature whereby dissimilar structures can be assigned. The structure members which have the same names are identified between the structures and the data is moved accordingly. Or something like that. This horrifies me on several levels, though I suppose it could be considered a sort "cast to a superclass".
- kazinator 6y agoIt seems to make sense in data-oriented programming. Say you want to create an invoice from a purchase_order or something. They have the same the order number, items, and figures. Just assign one to the other (or use it as a template for construction) to get the common values in, and fill in the rest.
- svat 6y ago> I might have learned about this via Knuth; I think there is a mention of it in some passage in TAOCP. Indeed, see Volume 1, section 2.4 (Multilinked Structures). Page 426 has the example of the statement “MOVE CORRESPONDING DATE OF SALES TO DATE OF PURCHASES”, which, if I understand correctly, means something like “for each field foo in Purchases.Date, copy Purchases.Date.foo into Sales.Date.foo”. The discussion is in the context of what kinds of data structures would be needed to compile such statements, which I guess makes sense considering that the original publisher offer for TAOCP was to write about everything a programmer would need to know to write a (60s-era) compiler. (Coincidentally: I've started attending an online meetup that someone is running for reading TAOCP—we usually read about four pages in the two hours—and this is the very topic that we're going to read tomorrow.)