String literals should be constant #879

Closed
brson opened this Issue Sep 2, 2011 · 2 comments

3 participants

@brson

Currently string literals are allocated and copied from constant C strings on instantiation, which is quite wasteful.

@marijnh

I agree that it's unfortunate for string literals to be non-constant. Unless we give them type @str, there doesn't seem to be a way around this though. Raw new-style strings own their memory. Whether that's a good idea is another discussion, but in this system you can't reuse string values.

@graydon

Subsumed into #2112, closing.

@graydon graydon closed this Apr 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment