DIP1000: Scoped Pointers

H. S. Teoh via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Aug 11 13:09:14 PDT 2016


On Wed, Aug 10, 2016 at 08:35:23PM +0000, Dicebot via Digitalmars-d-announce wrote:
> The first DIP has just landed into the new queue. It is a proposal from
> language authors and thus it bypasses usual nitpicking process and proceeds
> straight to requesting community (your!) feedback.
> 
> Essentially, it is an attempt to solve reference lifetime problem by
> extending implementation of `scope` keyword.
> 
> Proposal text: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
[...]

I found some unclear parts of the proposal:

- Under "examples for each rule", in fun2(), the comment says "OK, b is
  a regular int*". However, at this point b isn't declared yet, and the
  next line which declares b, declares it as int, not int*. So what is
  the comment supposed to say?

- Under "A few more examples combining the rules", in abc(), 3rd line,
  the comment says "Error, rule 5". But there is no rule 5!


T

-- 
I've been around long enough to have seen an endless parade of magic new techniques du jour, most of which purport to remove the necessity of thought about your programming problem.  In the end they wind up contributing one or two pieces to the collective wisdom, and fade away in the rearview mirror. -- Walter Bright


More information about the Digitalmars-d-announce mailing list