<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 6/13/19 10:40 AM, David Mason via talk wrote:<br>
<blockquote type="cite"
cite="mid:919d02f2-63ec-456f-bf62-592d9573635b@Spark">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<div name="messageBodySection">
<div dir="auto">My preface: 40 years of C programming is enough!
I don’t plan to write any more C; where I need that low-level
efficiency, I’ll use Rust. Ditto no C++; if I want objects,
I’ll do it right with Smalltalk.
<div dir="auto"><br>
</div>
<div dir="auto">With that said, Hugh makes a legitimate point
(if we were talking apples and apples).</div>
<blockquote type="cite" class="spark_quote" style="margin:
5px; padding-left: 10px; border-left-width: thin;
border-left-style: solid; border-left-color: rgb(26, 188,
156);">On Thu, Jun 13, 2019 at 1:12 AM (actually, earlier)
D. Hugh Redelmeier wrote:</blockquote>
| Rust culture and practice doesn’t seem to like shared
libraries.. I do.<br>
<div dir="auto"><br>
</div>
<div dir="auto">Rust does tend to create static code from
crates (its packaging system). But C does too, for source
code that you compile into your code. The difference is
that, because crates are understood by the compiler it is
*much* easier to make decisions about what version you want
in Rust.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Rust also *does* use dynamic libraries for
C/system code. I have a web server that uses sqlite3 and the
generated executable includes the sqlite3, resolve, and
system dynamic libraries.</div>
<div dir="auto"><br>
</div>
<div dir="auto">So the static part is the crates, and it is
trivial to discard the previously frozen versions and
compile with the latest versions.</div>
<div dir="auto"><br>
</div>
<div dir="auto">HOWEVER, since Rust code is intrinsically
much, much safer than C code, stability of API is much more
legitimate a characterizer of the version that you want than
bug-fixes (and bug-fixes are almost never security/safety
related). Rust uses semantic versioning of crates, so you
can specify, e.g. version 2.3.* of a crate, to get any
bug-fixes without any breaking changes.</div>
<div dir="auto"><br>
</div>
</div>
</div>
</blockquote>
Your mixing issues here.<br>
<br>
C defiantly has a number of shortcomings and features that can shoot
you in the foot but that has nothing to do with shared libraries.<br>
<br>
Shared libraries are not a "feature" of C and any programming
environment can be designed to have shared runtime linkable modules.<br>
<br>
The first reason to not have runtime linkable modules is because
doing it right is complex and it has take the unix world decades to
get the current reliable and stable environment working.<br>
<br>
As for versioning most times versions are to keep track of bug fixes
and no matter how safe and rigorous a programming language is
programmers are much smarter and find ways to introduce bugs into
their code.<br>
<br>
Having to recompile your programs whenever there is a version change
to a sub sub sub module is a major pain in the ass and just imagine
you had to rebuild your whole linux system any time there was a
software change.<br>
<br>
There are lots of reasons to not use runtime linkable libraries but
none of those reasons is the perceived "safety" of the language.<br>
<br>
<blockquote type="cite"
cite="mid:919d02f2-63ec-456f-bf62-592d9573635b@Spark">
<div name="messageBodySection">
<div dir="auto">
<div dir="auto">
All in all, I think Rust is making the right choice here.
(And C is making the right choice for C code, too - because
it’s so unsafe!)<br>
</div>
</div>
</div>
<div name="messageSignatureSection"><br>
<div class="matchFont">../Dave</div>
</div>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Alvin Starr || land: (647)478-6285
Netvel Inc. || Cell: (416)806-0133
<a class="moz-txt-link-abbreviated" href="mailto:alvin@netvel.net">alvin@netvel.net</a> ||
</pre>
</body>
</html>