[OT] Programming language WATs

Jonathan M Davis jmdavisProg at gmx.com
Fri Jan 20 19:30:31 PST 2012


On Saturday, January 21, 2012 04:20:36 Adam D. Ruppe wrote:
> On Saturday, 21 January 2012 at 03:18:43 UTC, Jonathan M Davis
> 
> wrote:
> > Yeah. String literals should definitely be immutable rvalues,
> 
> consider this though:
> 
> auto a = "hello";
> a = "new";
> 
> If is("hello" == immutable(char[])), then a would
> be too, and the rebinding would fail.
> 
> That'd be annoying.

Well, when it was changed so that IFTI treated arrays as tail-const, dsimcha 
proposed that we do the same with auto. If we did that, then it solves the 
problem.

- Jonathan M Davis


More information about the Digitalmars-d mailing list