[Aldor-l] Questions

Gabriel Dos Reis gdr at cs.tamu.edu
Mon Nov 12 13:01:11 EST 2007


On Mon, 12 Nov 2007, ldragan at aldor.org wrote:

| I'm not sure this can be considered as a bug (it might be a feature  
| ;-) ). The manual does not specify that the user should be allowed to  
| write string literals. The same is true for C: literals are not  
| writable, and this is not a bug in the C compiler.

A *string literal* in C is not writable, and that is not a bug in the C
standard.  But then, C does not have a type for strings.

For Aldor, the question is whether an object of type String is
writable.  I suspect the answer must be yes.  And the issue remains as
to how to internally distinguish mutable String from immutable
ones.  Languages like C++ adds `const' to try to make a distinction
(it should have been `readonly', but then we don't have a time travel
machine).  I suspect Aldor does want to provide a minimum of type
safety, consequently, we're talking about a type safety hole in the
compiler or specification.   

-- Gaby



More information about the Aldor-l mailing list