What would a minimal subset of D look like?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Jun 28 15:35:42 UTC 2019


On Friday, 28 June 2019 at 08:29:20 UTC, Stefan Koch wrote:
> This is less a question of a features essential-ness and more a 
> question of how much compiler integration is needed to 
> implemented it in an efficient and convenient (convenient for 
> the user) manner.

Well, it was posed as a question of what is essential.  Clearly 
some features are more used than others and some are difficult to 
replace with a library solution.

> For example bounds-checking and slices can be done as a library 
> easily, but it's so much more convenient if they are part of 
> the language.

But is it more convenient?  In terms of generic programming you 
often deal with array-like APIs rather than arrays and slices 
might need to support other indexing mappings in parallel code so 
that each core hits disjunct sets of cache lines etc.

What you need is the basic operators and a convenient syntax, it 
should not matter if the implementation is in a library.

> A type-system also needs to be integrated closely with the 
> compiler because it defines which code may be rejected early 
> thereby improving iteration times on faulty code.

Not sure what is meant by "iteration times", but yes, the type 
system unification process is an essential part of the compiler.

So which features have to be dealt with explicitly in the type 
system as a non-library type?




More information about the Digitalmars-d mailing list