Autor: Hendrik Boom Data: Dla: dng Temat: Re: [DNG] About the rust language
On Tue, May 28, 2024 at 05:16:42PM -0400, Steve Litt wrote: > I've looked into the newer languages like rust and go and Julia, and
> they don't work for me.
>
> As far as Julia, it's buggy as hell.
>
> With go and rust, these languages seem much broader than C, Python,
> Lua, old school Turbo Pascal and the like.
>
> What I mean by "broader" is that you need to memorize a whole lot of
> stuff because a whole lot of stuff is built into the language instead
> of just being createable in the language.
>
> As a counterexample, take C. C has very few commands and keywords to
> remember. Learn =, ==, <, >, if, while, for, struct, typedef, arrays
> and pointers and a small portion of the standard library and you're
> good to go. When you need to do something, you don't search for a
> command to do it, you just make it. If you didn't know about memcpy(),
> you could write it in about 6 lines of C.
>
> When I tried to learn go by taking a tutorial, the first three lessons
> all went well. Then, the next few lessons required me to remember more
> and more and more commands to the point where I couldn't hang.
>
> It's a little like the difference between math and history. With math
> you learn a few (perhaps difficult) principles and techniques, and all
> you have to do is apply the correct techniques in the correct order to
> do what you want. Very little memorization. With history, everything
> has at least two parties, a date, and an outcome. Trivial to learn, but
> difficult to remember. All I remember from history is that the Normans
> took over England in 1066, and the US declared independence in 1776.
> But I still remember enough high school and college math to be somewhat
> formidable, because principles are hard to forget. C is like math, go,
> and as I remember also rust, are more like history.
The difference between rust and most other memory-secure languages
(like Lisp, OCaml, and Modula 3) is that the others use a simple,
general, secure machanism for memory management, whereas Rust eschews
that and necessarily ends up with large variety of tactics to the same end.
What's true is that for most programming, you don't need the variety
of tactics, and garbage collection works just fine. Modula 3, by the
way *is* a language in which an operating system has been written.