HackerTrans
TopNewTrendsCommentsPastAskShowJobs

faresahmed

no profile record

Submissions

C++ Modules Are Here to Stay

faresbakhit.github.io
78 points·by faresahmed·6 เดือนที่ผ่านมา·140 comments

comments

faresahmed
·4 เดือนที่ผ่านมา·discuss
Take a look at https://contextgeneric.dev, it's as close as one can get to solving this issue without modifying rustc.
faresahmed
·7 เดือนที่ผ่านมา·discuss
I think that it's a generic programming problem: pointers are easier because the type of the pointee is easy to get (a deref) and also its location (memory) but with index-based handles into containers you can no longer say that given a handle `H` (type H = u32) I can use it to get a type `T` and not only that, you've also introduced the notion of "where", that even if for each type `T` there exists a unique handle type `H` you don't know into which container instance does that handle belong. What you need is a unique handle type per container instance. So "Handle of Pool<T>" != "Handle of Pool<T>" unless the Pool is bound to the same variable.

As far as I know no language allows expressing that kind of thing.
faresahmed
·11 เดือนที่ผ่านมา·discuss
Off topic, but Notion is a perfect example of how badly you can abuse web standards. This webpage, which is a document with some markup and links (the very thing the web was made for) takes ~600MB RAM, about 10 seconds load, and lags terribly. Just unusable.