On Tuesday, March 25, 2014 7:13:09 PM UTC+5:30, Antoon Pardon wrote:
> On 25-03-14 13:53, Rustom Mody wrote:
> > On Tuesday, March 25, 2014 4:08:38 PM UTC+5:30, Antoon Pardon wrote:
> >> So? We do use + -, so why shouldn't we use × for multiplication. Would
> >> such a use already indicate I should use a mathematical front-end?
> >> When a programming language is borrowing concepts from mathematics,
> >> I see no reason not to borrow the symbols used too.
> > Well...
> > Matters of taste are personal, touchy-feely things and not easily 
> > explainable.
> > Some of mine:
> > * for multiply does not bother me; ** for power for some reason does.
> > Even though the only standard math notation is non-linear and is off-limits
> > 'and' bothers me slightly (maybe because I was brought up on Pascal?)
> > '&&' less (and then C)
> > ∧ is of course best (I am a Dijkstra fan)
> > [But then Dijkstra would probably roll over and over in his grave at
> > short-circuit 'and'. Non-commutative?!?! Blasphemy!]
> > ÷ for some reason seems inappropriate
> > (some vague recollection that its an only English; Europeans dont use it??)

> > It doesn't bother me. IIRC in primary school before fractions were 
> > introduced,
> > a colon was used to indicate division.
> > And if we had hyphen '‐' distinguished from minus '-' then we could have 
> > lispish
> > names like call‐with‐current‐continuation properly spelt.
> > And then generations of programmers will thank us for increasing their
> > debugging overtime!! 
> Sure we could argue some partciculars. Personnaly I would prefer an up-arrow
> for exponentiation.

Ok

> IMO the advantage would be mainly in allowing more disambiguity. So that if
> you as a programmer think about something as an operator, you are not 
> obligated
> to somehow force it into the mold of + - * / % //.

> If → would have been used for attribute access, then we could just write 

Nice

> 5→to_bytes(4, "little") without having to consider that the lexer would
> try to interpret it as a floating point.

> And maybe ⤚ could have been used for concatenation. Which would mean that

Super! Anything but a (randomly overloaded) +!

> if you had a class whose instances could both be added and concatenated,
> you could implement both as an operator.

> Finally, I think I would prefer the middle dot ⸱ for lispish names so
> we would have call⸱with⸱current⸱continuation.

A bit unreadable out here but not too bad
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to