[nem-pl] Re: [nem-bug] [Nemerle 0000101]: warning message for giving the same name to two different def's should be changed

"Paweł W. Olszta" pawel.olszta at adv.pl
Tue Mar 16 08:43:55 CET 2004


feedback at nemerle.org wrote:

> ----------------------------------------------------------------------
>  awasylkowski - 03-16-2004 08:12 CET 
> ----------------------------------------------------------------------
> I have been aware of a fact, that redefining values in functional
> programming is common. I was just thinking changing the warning message
> would make things more clear for people moving from C#, for instance.
> Nemerle is supposed to be a better substitute for C#, and I remember us
> changing its syntax almost every tuesday to be more C#-like; that's why I
> opt for changing warning message.

Ja przepraszam, że na devel-pl, ale inaczej nie mogę.

Wydaje mi się, że przy mutable powinny być błędy, a przy def -- 
warningi, które można wyłączyć (-Wdo-not-warn-on-redef czy coś w tym 
guście) -- jeśli Kamil faktycznie by chciał redefiniować stałe.

Rationale: taki kod, w którym jest:

def x = ...;
def x = ...;
def x = ...;

f (x)

bardzo krzywo się czyta -- łatwo szukając definicji x w dużej funkcji 
pogubić się i pominąć tą najwcześniejszą.





More information about the devel-pl mailing list