Re: vote on assignments as expressions

Serge Orlov <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Mark Hahn wrote:
> There have been two or three times that the topic of having assignments
> usable as expressions in Prothon has popped up in this list.  I want to vote
> on it.  We are getting near July and I'm trying to tie up loose ends and
> there are a million loose ends like this on the list.  (I'm also tying to
> break a record for starting the most threads in one day <grin>).

> The proposal is to have an assignment syntax that can be used in an
> expression like "while item <- list.pop!(): process(item)".  We can't use
> the normal "a = b" because of the possible typo confusion in this situation:

>     if a = b:
>             blah blah blah

>     if a == b:
>             blah blah blah

> So we need an alternative syntax like "a <- b", but I don't want to use that
> for all assignments because "a = b" is so common.  Once again familiarity
> beats logic.

> Christian presented arguments against this in a thread starting here
> (amongst other topics):
>     http://www.prothon.org/pipermail/prothon-user/2004-June/002168.html

> Paul proposed using "<-" but others are possible.  Let's vote on two things.
> First cast a vote on having the feature at all.  Then whether you want the
> feature or not, vote on which syntax you'd prefer.

> # 1)  I WANT or DON'T WANT this feature in Prothon.

> #2) If I must have this feature, then I prefer the following syntax (look at
> these in your text editor):

>         a)    a <- b

>         b)    a <! b

>         c)    a <: b

>         d)    a <~ b

>         e)    a := b

>         f)    a gets b

>         g)    <other>

After reading the discussion
1) I don't want this feature
2) I want

while a gets b:
    <code>

    
  -- Serge
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.