Why is `scope` planned for deprecation?
via Digitalmars-d
digitalmars-d at puremagic.com
Thu Nov 20 13:26:16 PST 2014
On Thursday, 20 November 2014 at 20:15:03 UTC, deadalnix wrote:
> Many language make the mistake of thinking something is the
> holly
> grail, be it OOP, functional programming or linear types. I do
> think that it is a better engineering solution to provide a
> decent support for all of theses, and doing so we don't need to
> get them handle 100% of the case, as we have other language
> construct/paradigm that suit better difficult cases anyway.
FWIW, among language designers it is usually considered a
desirable trait to have orthogonality between constructs and let
them be combinable in expressive ways. This reduce the burden on
the user who then only have to truly understand the key concepts
to build a clear mental image of the semantic model. Then you can
figure out ways to add syntactical sugar if needed.
Having a smaller set of basic constructs makes it easier to prove
correctness, which turn is important for optimization (which
depends on the ability to prove equivalence over the pre/post
semantics). It makes it easier to prove properties such as
"@(un)safe". It also makes it easier to later extend the language.
Just think about all the areas "fibers" in D affect. It affects
garbage collection and memory handling. It affects the ability to
do deep semantic analysis. It affects implementation of fast
multi-threaded ADTs. One innocent feature can have a great impact.
Providing a 70% solution like Go is fine as they have defined a
narrow domain for the language, servers, thus as a programmer you
don't hit the 30% they left out.
But D has not defined narrow use domain, so as a designer you
cannot make up a good rationale for which 15-30% to leave out.
Design is always related to a specific use scenario.
(I like the uncanny valley metaphor, had not thought about using
it outside 3D. Cool association!)
More information about the Digitalmars-d
mailing list