The power of inertia in the programming world

Source: Internet
Author: User

Write by nine days Yan Ling (jtianling) -- blog.csdn.net/vagrxie

Discuss newsgroups and documents

Download Lua's windows binary release luabinaries today
We found that the release of luabinaries contains two DLL types: lua5.1.dll and lua51.dll. The lua5.1.dll size is suitable, and lua51.dll is only 11 K. It does not feel like a useful Lua DLL, read the luabinaries documentation,

This is explained in the document:

The luabinaries DLL packages have a DLL proxy called "lua51.dll ". it can be used to replace other "lua51.dll" released by other distributions. it will simply forward cballs to the "lua5.1.dll ". there is no compiled source code involved in the forwarding.

That is to say, lua51.dll is completely a lua5.1.dll proxy class without any actual code. It is just a forwarding to lua5.1.dll.

However, the document explains what lua51.dll is, but does not explain why such a thing is needed? I have never seen a similar situation. If there is a similar situation, it is also known that the existing dll can be replaced and the interface of the original dll can be fully simulated, and forwarding all functions that do not require hack to the original DLL. How does Lua need such a function?

So I googled and found the cause:
The standard DLL name "lua51.dll" has been selected more

Three years ago. Around twice every year someone comes along and

Thinks "oh, we absolutely need a dot in the dll version number ".

Alas, Windows does not like an extra dot in there. washthings

Break when you have an extra dot in DLL names. Depends on

Version of the OS, on the specific system call, on the library or

Tool used... it's hopeless. So please let's forget about it.

-- Mike

A post from lua-users.org
.

It turns out that a dynamic library named lua51.dll was identified three years ago. Some people think that we need to add a point between 5 and 1, otherwise, Will Lua version 5.1 be regarded as Lua's 51 version?

In this regard, some people have further raised questions.
Why has this problem been solved for so long?

Then someone answered:
But who's duty is to resolve the issue?


It's clearly not an issue of Lua as a language. it's just a consequence of (a very popular) luabinaries once releasing lua5.1.dll that became a de facto binary standard, then authors of your third-party Lua libraries were releasing Binary packages compatible with luabinaries.

Note: I'm not blaming luabinaries; that was just one unfortunate demo-that is difficult to be undone .--

Shmuel


We know:

Luabinaries made an incorrect decision, but it has already been released. Many 3rd-party libraries have also been released and depend on the lua51.dll of luabinaries. Therefore:
That was just one unfortunate demo-that is difficult to be undone.

It's just an unfortunate decision that is hard to undo now ............


Some things exist, even if it is unreasonable, because it has existed for a period of time, because of inertia, it will still exist. In programming, this situation often occurs. It suddenly reminds me of the previous project's frequent explanation of the causes of the program's poor code: "historical reasons ".

For the code, even if we all know that it can be reconstructed, there is a price for refactoring. In many cases, the compromise is due to the historical reasons.

For languages, C ++ is the language produced by the greatest compromise on history. Everyone acknowledges that if C ++ was not compatible with C, c ++ is not popular as it is now, and I admit that C ++ is compatible with C (often called the burden of history) c ++ loses too much in terms of the beauty of the language.

I think of a Chinese bull who had a similar feeling: "Every time I make a design decision, I am very careful, because it may be used for a very long time, when it still works, no one even wants to rewrite it."

Let's just look at this interesting event as an anecdote in programming.

 

 

 

 

The author of the original article retains the copyright reprinted. Please indicate the original author and give a link

Write by nine days Yan Ling (jtianling) -- blog.csdn.net/vagrxie

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.