removal of cruft from D
Justin Johansson
no at spam.com
Fri Nov 20 15:12:27 PST 2009
Lars T. Kyllingstad wrote:
> Nick Sabalausky wrote:
>> "Yigal Chripun" <yigal100 at gmail.com> wrote in message
>> news:he6sqe$1dqu$1 at digitalmars.com...
>>> Based on recent discussions on the NG a few features were
>>> deprecated/removed from D, such as typedef and C style struct
>>> initializers.
>>>
>>> IMO this cleanup and polish is important and all successful languages
>>> do such cleanup for major releases (Python and Ruby come to mind).
>>> I'm glad to see that D follows in those footsteps instead of
>>> accumulating craft like C++ does.
>>>
>>>
>>> As part of this trend of cleaning up D before the release of D2, what
>>> other features/craft should be removed/deprecated?
>>>
>>> I suggest reverse_foreach and c style function pointers
>>>
>>> please add your candidates for removal.
>>>
>>
>> s/reverse_foreach/foreach_reverse/ ;)
>>
>> 1. Floating point literals without digits on *both* sides!!! "1.",
>> ".1" --> Useless hindrance to future language expansion!
>>
>> 2. Octal literals! I think it'd be great to have a new octal syntax,
>> or even better, a general any-positive-inter-base syntax. But until
>> that finally happens, I don't want "010 == 8" preserved. And I don't
>> think the ability to have an octal literal is important enough that
>> lacking it for a while is a problem. And if porting-from-C really has
>> to be an issue, then just make 0[0-9_]+ an error for a transitionary
>> period (or forever - it'd at least be better than maintaining "010 ==
>> 8").
>
> It would definitely be a problem if octal literals disappeared from the
> language, even if only for a short while. They are pretty much the only
> sensible way to specify POSIX file permissions.
>
> import core.sys.posix.sys.stat;
> ...
> chmod("path/to/file", 0755);
>
> -Lars
Good point. Few if any other of us though of that! :-)
More information about the Digitalmars-d
mailing list