Without any ::prelude and some void* arguments. Maybe you have thoughts about it.

The URL is just a sample of “why” but not “because”.

I have my own preference but will keep it inside my mind to not burn a tornado that will erase me from the matrix of the world.

P.S.: I think C is faster, more powerful, and more elegant. I like it more than Rust.

  • @[email protected]
    link
    fedilink
    116 months ago

    C is many things, but elegant really isn’t one of them.

    C has always been part of the “worse is better”/New Jersey school of thinking. The ultimate goal is simplicity. Particularly simplicity of language implementation, even if that makes programs written in that language more complex or error prone. It’s historically been a very successful approach.

    Rust, on the other hand, is part of “The Right Thing”/MIT approach. Simplicity is good, but it’s more important to be correct and complete even if it complicates things a bit.

    I don’t really think of void* and ubiquitous nulls, for example, as the hallmark of elegance, but as pretty simple, kludgey solutions.

    Rust, on the other hand, brings a lot of really elegant solutions from ML- family languages to a systems language. So you get algebraic data types, pattern matching, non-nullable references by default, closures, typeclasses, expression-oriented syntax, etc.

    • @lysdexic
      link
      English
      05 months ago

      C has always been (…)

      I think you tried too hard to see patterns where there are none.

      It’s way simpler than what you tried to make it out to be: C was one of the very first programming languages put together. It’s authors rushed to get a working compiler while using it to develop an operating system. In the 70s you did not had the benefit of leveraging half a century of UX, DX, or any X at all. The only X that was a part of the equation was the developers’ own personal experience.

      Once C was made a reality, it stuck. Due to the importance of preserving backward compatibility, it stays mostly the same.

      Rust was different. Rust was created after the world piled up science, technology, experience, and craftsmanship for half a century. Their authors had the benefit of a clean slate approach and insight onto what worked and didn’t worked before. They had the advantage of having a wealth of knowledge and insight being formed already before they started.

      That’s it.

      • @[email protected]
        link
        fedilink
        4
        edit-2
        5 months ago

        ‘Worse is better’ came from a Common Lisp guy from MIT back in 1991, describing the success of C and UNIX.

        It’s really not just that Rust is new and C is old. Compare Rust with Go, for example. Go is a fairly modern example of a ‘worse is better’ language.

        Back in 1970s when C was invented, Lisp had been around for over a decade. C came out the same year as smalltalk, a year before ML, and 3 years before Scheme.

        Rust is a very modern language, yes. There’s no way we could have had it in the 70s; many of its language features hadn’t been invented yet. But it very much depends on MIT style research languages for its basis.

        • @ericjmorey
          link
          15 months ago

          Interesting how Richard Gabriel framed it as New Jersey (Bell Labs) vs MIT.