Jack Applegame:

What's the reason that the string literal is a dynamic array, not a static?

Originally it was a fixed sized array. But in most cases you want a dynamic array.

Rust language forces you to specify where to allocate the string literal with a symbol before the string, as ~"hello". In D they have chosen a simpler solution, defaulting to dynamic.

This enhancement is meant to lessen the problem a little:
http://d.puremagic.com/issues/show_bug.cgi?id=481

Bye,
bearophile

Reply via email to