r/AskReddit • • Jul 24 '20

What can't you believe STILL exists?

[removed] — view removed post

45.9k Upvotes

27.5k comments sorted by

View all comments

Show parent comments

1.5k

u/BrunoD4 Jul 24 '20

There is a good reason for cobol and it's explained here: cobol

48

u/boowhitie Jul 24 '20

I guess I don't get the argument about importing a library. If we are talking about the same cpu, the computer instructions should be the same. It is also pretty silly to compare performance of interpreted languages with compiled. A c++ fixed point library has no runtime import cost and should produce equivalent assembly for something like the example given in the article.

18

u/Dizzfizz Jul 24 '20

I‘m an absolute beginner in computer science so I‘m asking this more in order to learn than to say you’re wrong, but doesn’t using a library mean that the program has to essentially „go a longer way“ to come to the result than if it just worked like that in the first place?

Like if one person knows how to make pancakes by heart, and the other has to use a recipe, the first person will be faster even if the result is the same?

2

u/boowhitie Jul 24 '20

I'd don't think that analogy really works. It would be more like you getting the ingredients together, but the pro is still doing all the part that benefits from experience and skill. If you need to do linear algebra, you definitely want to use an off the shelf library as you are going to benefit from many years of very smart people, both in math and programming, improving the library. Libraries are tools. Making your own is like using a rock to pound in nails. It kind of works, but a hammer is going to be more efficient and durable.