String literals should be constant #879

brson opened this Issue Sep 2, 2011 · 2 comments

3 participants


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


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.


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