( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ? 
Author Message
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Hi all,

Maybe someone (like PSA member) would like to submit this (below) as an
entry to the To-Do list (in minor language design section)?
--------------------------------

New operators:
1) 'eq' (like '==');
2) 'ne' (like '!=','<>');
3) 'last' (like 'continue');
4) '..' for generating sequences (like '1..20' or 'a..z'),
like in Perl.

Generally for improving readability,
(and Perl compatibility).

------------------------------

evguenii



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> New operators:
> 1) 'eq' (like '==');
> 2) 'ne' (like '!=','<>');
> 3) 'last' (like 'continue');
> 4) '..' for generating sequences (like '1..20' or 'a..z'),
> like in Perl.

> Generally for improving readability,
> (and Perl compatibility).

oh, come on.  since when is "Perl compatibility" a
guiding principle for Python's design?

what's wrong with you folks?

</F>



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> > Generally for improving readability,
> > (and Perl compatibility).

> oh, come on.  since when is "Perl compatibility" a
> guiding principle for Python's design?

Well, i mean all that 1 million Perl programmers that would like to learn
python someday:)

But the MAIN reason is READABILITY

evguenii



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:


> > When did this become a trait of Perl?  Gods, what's so hard about knowing
> > that == is the equality operator?

> Well, just the same reason as for replacing '||', '&&' with 'or', 'and'.

I see... so you don't really want eq, gt, and ne; you want equal, greater, and
not equal.

add-1-to-cobol-giving-cobol'ly y'rs
-- bjorn



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?
On Wed, 19 Jan 2000 23:50:00 +0300 (MSK), Evguenii Smogailov
Quote:


>> > Generally for improving readability,
>> > (and Perl compatibility).

>> oh, come on.  since when is "Perl compatibility" a
>> guiding principle for Python's design?

>Well, i mean all that 1 million Perl programmers that would like to learn
>Python someday:)

>But the MAIN reason is READABILITY

When did this become a trait of Perl?  Gods, what's so hard about knowing
that == is the equality operator?

Steve

Quote:
>evguenii



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:


> > > Generally for improving readability,
> > > (and Perl compatibility).

> > oh, come on.  since when is "Perl compatibility" a
> > guiding principle for Python's design?

> Well, i mean all that 1 million Perl programmers that would like to learn
> Python someday:)

Just because I know lisp doesn't mean I can't learn python.  I don't
find it a defect that python doesn't support prefix notation like lisp
does (wouldn't it be awful if it did?  Yeesh...).  Python doesn't have
to be Perl for Perl programmers to be able to learn it.  I bet there are
a bunch of Perl programmers that even know Java.

Quote:

> But the MAIN reason is READABILITY

You're saying that Perl is readable? HAHAHAHA... Oh, you were serious...
Ok, 1 eq 2 is easier to read that 1==2?  Hmmmm... I think not.

Cluttering Python's syntax with additional operators like eq, etc. where
operators like == already exist is just a bad idea.  If you really want
it, create a module perl.py that has the following:

def eq(a, b):
    return a==b
def gt(a, b):
    return a > b
..etc..
And then, no one will be able to read your code.

--
print(lambda(q,p):'pmt:$%0.2f'%(q*p/(p-1)))((lambda(a,r,n),t:(a*r/
t,pow(1+r/t,n*12)))(map(input,('amt:','%rate:','years:')),1200.0))



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> Sent: Wednesday, January 19, 2000 1:52 PM
> To: Evguenii Smogailov
> Cc: Python Mailing List
> Subject: Re: ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?


> > New operators:
> > 1) 'eq' (like '==');
> > 2) 'ne' (like '!=','<>');
> > 3) 'last' (like 'continue');
> > 4) '..' for generating sequences (like '1..20' or 'a..z'),
> > like in Perl.

> > Generally for improving readability,
> > (and Perl compatibility).

> oh, come on.  since when is "Perl compatibility" a
> guiding principle for Python's design?

> what's wrong with you folks?

Seminar posters.  I think that's what we're seeing.  They attend seminars
where they are carefully taught how to write posts that distract and annoy
the readers of the target news group/mailing list/whatever.  The seminars,
of course, are sponsored by vast conspiracies that aim to popularize severe
hackery in its various forms, such as four-letter languages beginning with
P.

Okay, I'm kidding, don't get upset.

--
M.



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> Generally for improving readability,
> (and Perl compatibility).

That's not an and, that's an xor.

-Justin



Sun, 07 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:
> When did this become a trait of Perl?  Gods, what's so hard about knowing
> that == is the equality operator?

Well, just the same reason as for replacing '||', '&&' with 'or', 'and'.

(and you mean i need remember these '!=' and '<>' also :)

evguenii



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> Just because I know lisp doesn't mean I can't learn python.  I don't
> find it a defect that python doesn't support prefix notation like lisp
> does (wouldn't it be awful if it did?  Yeesh...).  Python doesn't have
> to be Perl for Perl programmers to be able to learn it.  I bet there are
> a bunch of Perl programmers that even know Java.

I have made no such statements (like someone can't learn something), it
is your extrapolations:)

Quote:
> You're saying that Perl is readable? HAHAHAHA... Oh, you were serious...
> Ok, 1 eq 2 is easier to read that 1==2?  Hmmmm... I think not.

Yes, i'm saying that 'eq', 'ne' are more readable then '==' '!=', '<>',
'next' shorter then 'continue' and '..' operator can be a good thing to
consider.

evguenii



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:


> > > When did this become a trait of Perl?  Gods, what's so hard about knowing
> > > that == is the equality operator?

> > Well, just the same reason as for replacing '||', '&&' with 'or', 'and'.

> I see... so you don't really want eq, gt, and ne; you want equal, greater, and
> not equal.

Yes, something like this;

evguenii



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> Yes, i'm saying that 'eq', 'ne' are more readable then '==' '!=',
'<>',
> 'next' shorter then 'continue' and '..' operator can be a good thing
to
> consider.

> evguenii

I like the following syntax for readability, and feel the this should be
implimented in Python:

        sub     ax,bx           # Lets keep the python comment symbol
        jne     Mylabel         # We also need labels
        rtn                     # Notice all commands are three chars
Mylabel
        add     00h,ax

The above really simplifies things.

I love taxonomy, and want to see more confusing options in a language.

Sam Schulenburg

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?
Hi Evguenii

Evguenii Smogailov schrieb:

Quote:
> Well, just the same reason as for replacing '||', '&&' with 'or', 'and'.

I consider it a bad idea, to add synonyms for things that are
already in the language. So _adding_ "greater" to the language (do you
really find "greater" or just "gt" more readable as ">"?) is not
the same as using "or" _instead_ of "||".

Perhaps the ".." operator is something to consider (if it isn't
incompatible with somethings else in the language), but most of
the times "range" does it's job very well.

Stefan



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:

> Well, just the same reason as for replacing '||', '&&' with 'or', 'and'.

hmm.  I'm beginning to think that maybe, just maybe, you
should do a little more research on Python's origins.

</F>

PS: start here: http://www.cwi.nl/~steven/abc/qr.html



Mon, 08 Jul 2002 03:00:00 GMT  
 ( 2.31.New operators: 'eq', 'ne', 'last', '..' ) ?

Quote:
> I like the following syntax for readability, and feel the this should be
> implimented in Python:

>    sub     ax,bx           # Lets keep the python comment symbol
>    jne     Mylabel         # We also need labels
>         rtn                        # Notice all commands are three chars
> Mylabel
>    add     00h,ax

I feel this may be too confusing. I'd prefer a syntax like this:

1000101001011101010010101001010100010010010001000100100101000101
1011000001100100100010010010001010011101001001010100100101010010

etc.

--------------------------------------------

http://www.optichrome.com



Mon, 08 Jul 2002 03:00:00 GMT  
 
 [ 25 post ]  Go to page: [1] [2]

 Relevant Pages 

1. stream('file','c','seek ='x) problem

2. Wanted: Hints'n'Tips'n'Bits'n'Bobs

3. There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand

4. What means, e.g., ('';'/')"_

5. 'C'/'C++', ADA OPPORTUNITIES/Phoenix(Software Developer/Integration Test Engineer)

6. STRING 'make'/'remake'

7. kill '-SIGHUP', pgid -vs- kill 'SIGHUP', 0

8. question: 'A'..'k'

9. Z''''

10. 'with'ing and 'use'ing

11. char** to {'':('',)}

 

 
Powered by phpBB® Forum Software