Very limited shared promotion
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Jun 19 07:39:03 UTC 2019
On Tuesday, 18 June 2019 at 23:30:07 UTC, Manu wrote:
> `scope` has a lot to say in this whole space; it must prevent
> escaping references that are only intended to have a finite
> life. We may reach limitations with `scope` today and need to
> make improvements, but that's fine. Some limitations in this
> space are fine to work through... but even in lieu of
> watertight solutions, we can make working solutions which are
> very helpful and hard to break unless you deliberately go out
> of your way to do so.
Right, but a type system should not be evolved, it should be
designed as a whole where everything fits together in a wholesome
manner.
So, what you are asking for isn't unreasonable, but to me it
suggests that the type system as a whole should be reconsidered.
> The worst thing that happens is that we stop making progress
> because a limitation of this sort inhibits development on other
> axiis. We're often too timid, and it hurts D's velocity
> immensely.
Maybe, I think the special cases hurts. The documentation for
functions is suitable for scaring away most programmers with all
the various ways to specify parameters and return types:
https://dlang.org/spec/function.html
Function prototypes ought to be simple to write…
I think D would benefit from taking a good hard look on what has
to be in the language, what could be done as a library feature,
and how the metaprogramming capabilites could be extended to move
more out of the language and into libraries.
Moving more to the std library would not mean that compilation
would slow down, as compilers could optimize std library features
(hardcore the mechanism in a compatible manner).
But that is only my opinion, although I think it is the ideal in
language design that most people would agree on (in theory at
least).
Ola.
More information about the Digitalmars-d
mailing list