shouting versus dotting
Aarti_pl
aarti at interia.pl
Wed Oct 8 02:11:17 PDT 2008
Andrei Alexandrescu pisze:
> Marcin Kuszczak wrote:
>> Andrei Alexandrescu wrote:
>>
>>> Aarti_pl wrote:
>>>> I would be much more happy with implementation of my proposal:
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=1827
>>>>
>>>> I mean here especially syntax for "is expression" for templates.
>>>>
>>>> http://digitalmars.com/d/1.0/expression.html#IsExpression
>>>>
>>>> As it occurred on Tango conference in talk of Rafał Bocian (who lead
>>>> the
>>>> D course for students) syntax for "is expression" and specification
>>>> (among few other things) is especially difficult for newbies in D.
>>>>
>>>> Unfortunately answer from Walter, why he didn't decide to change
>>>> current
>>>> syntax was.... guess what? --- It doesn't look nice in code...
>>>>
>>>> Bad luck, said sad pirate .(
>>>>
>>>> BR
>>>> Marcin Kuszczak
>>>> (aarti_pl)
>>> Your proposal should be reevaluated in wake of the conditional
>>> templates, which Walter has implemented a couple of releases ago.
>>>
>>> Andrei
>>
>> Yes, I am aware of that. They are just small part of the whole
>> proposal, but
>> currently implemented in such a way that it is not possible to use it in
>> e.g. static asserts and aliases like it was proposed.
>>
>> I still think that proposal is good (no one pointed out problems with
>> it).
>> It could be implemented as kind of compile time expression once, and then
>> used in other places. It allows also more expressiveness and predictable
>> syntax e.g. void call(T : class)(T instance) {} I hope that above
>> mentioned issues with current design of IsExpression will
>> be eventually fixed somehow, sometime...
>
> I agree that pattern matching on type trees will have to make it into
> the language in one form or another. In fact, syntactically it is
> already there, but compiler bugs/limitations prevent it from happening.
> One thing with the notation you suggest is that it doesn't quite look
> like the rest of the language,
Really? I got in my code a lot of similarly looking code. My proposal is
in fact generalization and "uniformization" of existing syntaxes of
template parameters and is expression. In most common cases you get same
syntax as now.
> and perhaps a few simple steps could be
> taken to make it more integrated.
>
I have nothing against improving this syntax. But I would be happy to
get one uniform syntax for: template parameters, IsExpression, static
assert, static if. And to dismiss this ugly:
T : T[]
creature ;-)
With my proposal you got only one universal syntax and few design
mistakes fixed. With current implementation state we probably lost
opportunity for uniform syntax.
>> The strange think here is how minor issues (as most of community doesn't
>> have problem with it) suddenly emerges from deeps and good ideas (which
>> solve real problems) are sunken in the water... Well, I can give more
>> examples if you want :-)
>
> This is pointing at some being born into royalty while others' good work
> is under-compensated. Well in a way I'm glad you bring this up. One
> thing that has caused and is causing an amount of stir and occasional
> irritation is the perception that I came out of nowhere and captured
> Walter's attention effortlessly. The reality is that being neighbors
> with Walter was part of the mix, but the prosaic bulk of it is that
> Walter cared only because of my previous and ongoing 99% transpiration.
> For better or worse, this state of affairs makes it that whatever I say
> is perceived as much more intense, imposing, controversial, quirky, or
> arrogant, than it is, and therefore much more scrutinized and
> criticized. This reaction is entirely understandable, and I'm still
> thinking of ways to assuage it. In the meantime it's costing me time
> because I feel obligated to answer the many replies to my posts.
Great that you see this issue. And even greater that you think
rationally how to solve it.
Currently I think that it would be good to ask community about top 5
problematic issues with D (not features, nor bugs because it would be
better to get more general knowledge). And after sorting out final top 5
list, commit to improve situation or solve problem in these areas in
reasonable, defined time. I think that people could post here proposed
features, most annoying bugs, D design mistakes, problems with
processes, problems with web pages etc. Just one restriction: only 5,
single, well defined issues in decreasing priority.
Well, I think that it might help to know what community really needs.
> That being said, it is always great if you can bring to the fore more
> outstanding problems that you think have good solutions thought of by
> you or others. Just please consider the above when you compare and
> contrast them against the petty issue of "!()".
>
>
> Andrei
I think that asking people about "top 5 issues" (see above) will bring a
lot of such a things. I will certainly contribute with my 5 groszy
(Polish "cents").
Best Regards
Marcin Kuszczak
(aarti_pl)
More information about the Digitalmars-d
mailing list