Suggestion: Remove implicit conversion from T[n] and T[] to T*
Sean Kelly
sean at f4.ca
Mon Dec 4 14:12:10 PST 2006
Oskar Linde wrote:
> Removing the implicit conversion from static arrays (T[n]) and dynamic
> arrays (T[]) to pointers T* may be quite controversial, but would help
> clear up some problems and feels like the right step to take.
Would this affect the interpretation of string literals? ie.
printf( "hello world!" );
I've personally never had a bug related to this aspect of the language
so for me it's simply a matter of whether the perceived benefits
outweigh the irritation of using the new syntax. One possible
alternative to the above would be to simply change all char* parameters
for C routines to byte* parameters. Or are char arrays implicitly
converted to byte pointers as well?
Sean
More information about the Digitalmars-d
mailing list