Rust will revolutionize ecosystem of high level language?

I interrupt this eloquent conversation with a relevant meme.

10 Likes

I think you will find "C is Not a Low Level Language" both interesting and relevant. If you'd like to skip ahead, start from "Understanding C" which directly contradicts your assertion.

Keep in mind, we are discussing a topic that is broadly applicable. Understanding the scope in which terms like "high level" and "low level" are used will make the conversation more approachable. I made an attempt to set that scope for my argument.

In the scope of computer hardware, Rust and C are indeed high level languages. A sequential-looking piece of C or Rust will be compiled into potentially hundreds of simultaneously in-flight operations with instruction level parallelism. This is the kind of irrelevant detail you cannot express in these languages. I know this, and yet I chose to ignore the scope of hardware because it would conflate the matter. One does not need to define a pointer type any more than they need to define instruction level parallelism.

Please, let's stop using pejorative language.

This question was answered in the Alan Kay paper, starting with "Should we even try to teach programming?" and concluding with:

The reason, therefore, that many of us want children to understand computing deeply and fluently is that like literature, mathematics, science, music, and art, it carries special ways of thinking about situations that, in contrast with other knowledge and other ways of thinking critically, boost our ability to understand our world.

It is a philosophical answer, perhaps, but it is an adequate answer to your serious question. Once again, I suggest reading the original material.

2 Likes

The thing that I find easier about functional languages with immutable data (I'm staying away from the overloaded term "higher level") is that I don't have to distinguish between T and &T, and there is no distinction between sized and unsized types, or between stack and heap allocations. This simplifies programming.

However, such languages that I know (Clojure, Racket, Haskell and OCaml) also rely on a GC and do not do as great job as I would like (yet) at optimizing away allocations that can be stack allocated. This is constantly improving and I expect that in 10 or 15 years we'll have such languages that perform almost as well as Rust (C/C++/Zig). In the meantime, I'm happy that we have Rust!

To be clear, I'm only talking about the aspect of programming I've mentioned, not about static vs dynamic typing or other aspects.

I proposed something similar in a 1986 paper (which I can no longer find) when I discovered the problems of interfacing C and Fortran. I really thought we would have simple cross-language calls by now. The problem must be harder than I thought.

1 Like

IOW: you have decided to completely ignore the original meanings of the words and invented some other, entirely novel interpretation.

Why should we accept that new terminology?

That's fair. Offer some other term. But please don't abuse words which already have a meaning.

By your definition Idris would, suddenly, become a very low-level language — and BCPL would become high-level language since it only have one data type.

No. Please read what you wrote. Music and art give you special ways of thinking — yet we don't teach the finer aspects of making a sculpture or a ways to play a guitar to everyone. And even literature is teached minimally to most. Around 5% or less are studying these deeply thus said “answer” makes me even more skeptical: if you would accept that the reason we should teach someone programming is the same as the reason why we should teach someone science then the conclusion would be, definitely, the opposite from what you claim: we should give an opportunity to learn these deeply to anyone, but only these who are interested should actually learn. The majority of these 5% who are easy learners would pick it and maybe some from 80% would pick it, too — but there are no need to pressure them and there are no need to make life worse for the ones who have already learned how to think about ownership.

Thanks for stopping the abuse of “higher level” term. Because I'm not sure if Haskell (with it's insistence of separation between pure and non-pure types) would may be considered “high level” by the definition of “a programming language is low level when its programs require attention to the irrelevant”. And it doesn't even free you from confines of hardware: sometimes you have to enforce strict execution (instead of usual lazy execution) or else your program would overflow stack and crash!

But that's the key point! If there are no “high” (== easier to use, safer, better) and “low” (harder to use, more performant, closer to the metal) languages, but only languages which which are easier to use for certain tasks then the idea of having just two languages (“low-level” and “high-level”) stops being attractive.

Even “sloppiness” can be valuable! Yes, sooner or later, all sloppy languages become popular enough that people start building large programs in then and yes, they are starting to get features from stricter languages at that point, but if you stick to the advice please don't use Python except for small scripts then Python can be valuable, too!

Of course if you stick to that advice then, suddenly, it becomes not that important to make interaction between “sloppy” languages and “strict” languages seamless: if only small scripts are written in “sloppy” languages and the majority of code is in “strict” languages then the need to make interaction seamless disappears!

:upside_down_face: :innocent: ahaha. I have asked a very simple question if other language's lib will wrap Rust lib in futur, instead to redevelop one.

I see the discussion drifted into an intensive debate about whether Rust is low level or no. Because I was clumsy enough to say that Rust is low level. I'm sorry, I have fix that in my post above

Someone will say Rust is high level and productive language, I agree. Here "productivity" and low/high language are a measure relative to other good language. I have change the definition of low/high level language in my question for easier express my idea, don't pay attention.

This is my first post in Rust community. I can feel that the community is very dynamic. :slightly_smiling_face: That will be fun when I will learn Rust and integrate into the community

2 Likes

It'll be interesting to see if WASM/WASI will improve this in any way. That would require compiling all code to WASM to gain the benefits though, which is not ideal in a lot of cases.

I don't think "sloppy" is necessarily pejorative.

"slop" and "sloppy" have been used in engineering to describe loose fitting components since forever. Often a degree of slop is desirable in getting things to fit together easily or operate correctly.

I would posit the the degree of "slop" that allows 8 bit types to be assigned to 16 bit types in C or strings of digits to be treated as integers in languages like Javascript or whatever is a design goal with a particular aim in mind.

1 Like

No words are pejorative until they are. People use "perfectly fine" or "technical" words with well defined meanings as insults, and then they pick up that connotation of being used as an insult.

"Sloppy" definitely carries a negative connotation here. "Loose" (also used to describe tolerances!) is a much less judgemental word that communicates much the same objective meaning (though "loosely typed" carries its own controversy).

"Loose" can be very judgmental. As in "loose woman".

A agree, context can change a words meaning. I do not see any problem with the way "sloppy" was used here.

I think the context of the discussion must be taken into account. While calling some languages "sloppy" is easily seen as pejorative, the fact is that it could be seen as an accurate description especially in the context of a comparison with a language which might be described as "opinionated". By that I'm referring to the fact that Rust will disallow many type system related infractions which some languages will completely ignore (among other things). So while I agree that we need to be careful with how we word things to keep from devolving into a flame war, I don't think harm was intended. Plus, we must also remember that there are many for whom English is a second language and might not have grasped the nuance that this could even be offensive.

So yes, let's be civil to each other and to other communities. But let's also be careful to not take offense where none was intended, or maybe just err on the side of hoping for the best from others.

It's kinda like Rice's theorem -- any interesting property of a language will be seen as a misfeature by some.

2 Likes