Differentiate const flavors using CASE?
Tom
tom at nospam.com
Wed Mar 21 21:10:49 PDT 2007
Ary Manzana escribió:
> Andrei Alexandrescu (See Website For Email) escribió:
>> Derek Parnell wrote:
>>> On Thu, 22 Mar 2007 04:53:26 +0900, Bill Baxter wrote:
>>>
>>>> Here's a random thought:
>>>> What about const vs CONST?
>>>> The upcase version obviously being the more const of the two.
>>>> The original proposal played with punctuation, and we've talked
>>>> plenty about spelling, but we haven't talked about playing with
>>>> case. It would be an odd-ball among keywords, admittedly, but if
>>>> you asked 100 people which of 'const' and 'CONST' was the most
>>>> constant you'd probably get 100 votes for 'CONST'. And he could
>>>> become good friends with foreach_reverse, the other odd-ball keyword
>>>> who is disparaged by the other kids because of his obesity and the
>>>> big staple in his belly button.
>>>
>>> LOL ... Now that *is* funny.
>>
>> Yah :o). Speaking of foreach_reverse, probably it would be wise to
>> lobby Walter to deprecate it in favor of foreach(reverse) (item ;
>> collection) { ... }. The keyword(extra) syntax is definitely becoming
>> a D signature syntax.
>>
>>
>> Andrei
>
> I've actually started to like foreach_reverse. I most of the time
> program in Java and, you know, Java 1.5 has foreach:
>
> foreach(String s : words) {
> }
Actually, I think it is:
for (String s: words) {
}
So it was that they didn't add the 'foreach' keyword to preserve
backward compatibility... which I find pretty ridiculous (but I could be
wrong) :)
--
Tom;
More information about the Digitalmars-d
mailing list