shouting versus dotting

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 5 15:45:03 PDT 2008


Leandro Lucarella wrote:
> Michel Fortin, el  5 de octubre a las 03:53 me escribiste:
>> On 2008-10-05 01:14:17 -0400, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> said:
>>
>>> I don't favor "." any more than the next guy, but I am glad there is awareness of how unfit a choice "!" is. If you have any ideas, please post them! Ah! I! 
>>> Exclaimed! Again!
>> Hum, I don't think we have much choice, it'll have to be something in this lot:
>>
>> 	Positive!(real)(joke);
>> 	Positive.(real)(joke);
>> 	Positive#(real)(joke);
>> 	Positive@(real)(joke);
>> 	Positive&(real)(joke);
>> 	Positive`(real)(joke);
>> 	Positive´(real)(joke);
>> 	Positive^(real)(joke);
>> 	Positive¨(real)(joke);
>> 	Positive\(real)(joke);
>>
>> Anything else I forgot?
>>
>> Or we could use special delimiter characters:
>>
>> 	Positive<real>(joke);
>> 	Positive“real”(joke);
>> 	Positive«real»(joke);
>> 	Positive#real@(joke);
>>
>> Each having its own problem though.
>>
>> My preference still goes to "!(".
> 
> I think this is exactly the point. ".(" don't look that much better than
> "!(" (if better at all), so why should a new syntax variation should be
> introduced to the language with that small (and arguable) benefit?

I think it's reasonable to say that The Sad Pirate won't make it. I hope 
a different fate awaits for unparenthesized instantiations.

> "enum" as the way to declare manifest constants were much more ugly than
> "!(", and most of the people were against it. I don't see why ".(" should
> be introduced.

Ugly or not, enumerated symbols were manifest constants to begin with. 
That's kinda hard to argue against because it's a sheer fact.

> And if it's introduced, you'll have to read a lot of "!(" anyways, is not
> that you will be solving any problems, because all D1-ported code (and
> code of people who like "!(" better) will use it instead of ".(" (unless
> "!(" stops working, in which case it's really dumb to make D1 incompatible
> with D2 for this such a small aesthetic issue). So you'll just make things
> whorse.
> 
> -1 for ".("
> 
> 
> PS: I wont use Positive!() either ;)

Would you use Bounded? It takes a type, a minimum, and a maximum.


Andrei



More information about the Digitalmars-d mailing list