bearophile Wrote:

<snip> 

> it prints: "redundant storage class in". So const and "in" seem really the 
> same thing. But then what does it mean "immutable in"? I guess it just means 
> transitive-immutable.
> 
> "immutable out" and "const out" are thankfully disallowed. So I guess "in" is 
> now deprecated, it's just an alias of "const. But this idea seems wrong 
> because "in ref" is disalloed but "const ref" is allowed, so they aren't just 
> an alias of each other.
> 
> So the available ones are ("in" not listed to keep a bit of my sanity):
>  immutable type
>  const type
>  out type
>  immutable ref type
>  const ref type
>  type
>  type*
>  type**
>  etc
> 
<snip>

>From the D2.0/Language/Functions page, under Function Parameters:

"The in storage class is equivalent to const scope."

That's why the "const in" combination doesn't work.

Paul

"I can't tell a lie -- not even when I hear one."
John Kendrik Bangs, A House-Boat on the Styx.


Reply via email to