{"id":97,"date":"2004-08-30T22:24:19","date_gmt":"2004-08-30T21:24:19","guid":{"rendered":"http:\/\/www.nobugs.org\/blog\/archives\/2004\/08\/30\/fixing-computers-dynamic-linking\/"},"modified":"2004-08-30T22:24:50","modified_gmt":"2004-08-30T21:24:50","slug":"fixing-computers-dynamic-linking","status":"publish","type":"post","link":"https:\/\/www.nobugs.org\/blog\/archives\/2004\/08\/30\/fixing-computers-dynamic-linking\/","title":{"rendered":"Fixing computers \/ Dynamic linking"},"content":{"rendered":"<p>Who says you can&#8217;t <a href=\"http:\/\/www.hhhh.org\/~joeboy\/past_projects\/wcl_project_oxcart\/wcl_project_oxcart.html\">fix things<\/a> any more?  (<a href=\"http:\/\/wearables.unisa.edu.au\/projects\/OxCart\/www\/\">more photos here<\/a>).<\/p>\n<p>Sitting at work waiting for our C++ application to link reminds me that just because your language <i>can<\/i> do lots of stuff at compile time doesn&#8217;t mean you necessarily want it to do so.  Usually with a C++, the linker goes through your code figuring out what address each function will live at, and making each function-call jump to that address.  You do almost all the linking work upfront.  In contrast, other languages are lazier &#8211; they don&#8217;t bother doing any work until it&#8217;s actually needed, which makes for faster edit\/compile cycles because you&#8217;re not doing the work upfront.  Actually, often these languages forced into being lazy because the information isn&#8217;t available at compile time.   But contrapositive doesn&#8217;t apply: if you have the information you don&#8217;t <i>have<\/i> to be eager.  A C++ compiler could delay figuring out which function to call until the first time the function was called.  You&#8217;d also need to keep all the type information around until runtime, but you&#8217;re probably already doing that for debugging purposes anyway.  You&#8217;d be moving one phase of the compiler from compile-time to run-time.  <\/p>\n<p>You might think it would all be much easier to do this stuff by starting with a more dynamic language. but then with &#8220;dynamic-C++&#8221; you still maintain the benefit of having static typing checking for silly mistakes.  Which brings me full circle to <a href=\"http:\/\/lambda-the-ultimate.org\/node\/view\/219\">a paper<\/a> which was on <a href=\"http:\/\/lambda-the-ultimate.org\/\">LtU<\/a> recently which discusses this very topic (and which I have yet to read!).<\/p>\n<p>Ah, dynamic languages vs. static languages.  Here I am again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Who says you can&#8217;t fix things any more? (more photos here). Sitting at work waiting for our C++ application to link reminds me that just because your language can do lots of stuff at compile time doesn&#8217;t mean you necessarily want it to do so. Usually with a C++, the linker goes through your code [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nobugs.org\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}