Safe mode in D?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Oct 18 10:41:38 PDT 2013


On Fri, Oct 18, 2013 at 01:38:12PM -0400, Jonathan M Davis wrote:
> On Friday, October 18, 2013 10:31:55 H. S. Teoh wrote:
> > On Fri, Oct 18, 2013 at 07:25:03PM +0200, Dicebot wrote:
> > > On Friday, 18 October 2013 at 17:19:17 UTC, Adam D. Ruppe wrote:
> > > >On Friday, 18 October 2013 at 17:06:57 UTC, H. S. Teoh wrote:
> > > >>But if we're gonna do it, I say we should go all the way:
> > > >And make scope the default parameter thingy, and implement it.
> > > >
> > > >God I want some kind of escaping check thing so badly, it is
> > > >supposed to work already!
> > > 
> > > Yeah it is astonishing how many holes in type system implementing
> > > that single small thing can fix. I wish it never was in
> > > documentation, that way I would not have bothered me that much at
> > > least :)
> > 
> > So what's the hold up? Just the lack of manpower to actually
> > implement it?
> 
> The facts that escape analysis tends to be difficult and that Walter
> generally refuses to do anything in the compiler which involves flow
> analysis would tend to make scope very difficult to implement
> properly.

What's the reason for refusing to implement flow analysis? Maybe I'm
missing something obvious, but for the purposes of escape analysis,
isn't it enough to just have a simple one-pass flow analysis? Do we
really need full-scale flow analysis in order to do escape analysis?


> I don't know that Walter has any plans with regards to scope at this
> point or not. At the moment, it seems to be relegated to delegates
> only, and even there, it's not fully implemented.  AFAIK, no plans
> beyond that for scope have ever been announced. It's just that the way
> that it's defined in the spec implies that it would work with any
> reference type.
[...]

Well, then we should either change the spec, or make concrete plans on
how to implement it. The current state of limbo that scope is only
generates bad rep for D while offering nothing in return.


T

-- 
Right now I'm having amnesia and deja vu at the same time. I think I've forgotten this before.


More information about the Digitalmars-d mailing list