Re: Minor syntax improvements (proposal)

Bruce Hoult <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <CAMU+Ekz0o_v9tp9cN_GMUgDCPB8mN4uNe7v-AbPhb70D=rQp3A@mail.gmail.com>
Thanks for your suggestions.

I don't have any strong feelings over the first one stylistically, but
combining let and local would I think make the language harder to
parse and 'local" is not very frequently used and should stand out.

I'm *strongly* against changing = and :=. They do very different
things. Assignment using := is dangerous, makes programs difficult to
analyse and understand, and should be avoided where possible. That's
pretty much the whole point of "functional programming". Using := is
rare in my programs, and SHOULD stand out as being different to normal
code.



On Fri, Mar 1, 2013 at 1:42 AM, Luis Pedrero <[email protected]> wrote:
> Hi
>
> sensing from the recent emails that there is some chance for
> language-changing proposals to be accepted, or at least to be taken
> into serious consideration (which does not happen in every language
> community), I gathered the courage to venture some small proposals of
> my own.
> Not much of a contribution, to be sure, and only pertaining to
> superficial aspects of the language.
>
> 1) allow the use of the keyword "local" (in addition/substitution to
> "let") to define a local variable. The word let, in itself, does not
> convey any meaning on locality, and in theory could also apply (for
> those who are not familiar with the language) to any type of variable.
> So it is a bit misleading, or at least not so much useful. The keyword
> local is much better, because it is self-explanatory.
>
> 2) Simplify the syntax of assignment operators, for the sake of
> consistency and simplicity. In all cases where an assignment is taking
> place, I propose that only one operator should be used.
> I fail to see the reason why = is used at all, in addition to :=
> I am probably missing something, but the point is: whatever the
> rationale for using =, i.e. yet another operator, in addition to :=,
> is this really justified in terms of economy of the language? I am not
> talking only in terms of compiler economy, but also in terms of
> programmer's mental economy... In sum, it would be much simpler to
> have only one assignment operator, and := is of course the best
> choice, because it is not ambiguous, whereas = is commonly used by
> many programmers for equality testing.
>
> These two improvements will add to the readability of the language, I believe.
>
> Regards,
>
> Luis
> _______________________________________________
> hackers mailing list
> [email protected]
> https://lists.opendylan.org/mailman/listinfo/hackers
_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.