this post was submitted on 11 Aug 2023
1 points (100.0% liked)

The Rust Programming Language

1 readers
0 users here now

A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and...

founded 1 year ago
MODERATORS
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/rust by /u/OS6aDohpegavod4 on 2023-08-11 04:20:18.


I couldn't find any formal definition of it, at least for Rust. The Book uses it to describe "not generic" types, but at some point I had just assumed that it meant "not polymorphic", since polymorphism is an abstraction and "concrete" (at least to me) very clearly means "not abstract". As in I can look at the type and know what it is (e.g. a struct, enum, u64).

If I see a generic, I don't know what it could be (it could be many things). The same goes for trait objects, though. Enums are also a kind of polymorphism, but I always thought of them as concrete since I can see it's an enum and can look at the variants.

Are trait objects concrete types? If so, then I guess concrete type literally just means "not generic"? Or is it something else?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here