Wow, this is pretty cool.
For what it's worth, Mathematica does a bit of this. (But it's not really
On Thu, Jul 1, 2010 at 4:35 PM, Dov Grobgeld
> The use of assigment through left arrow (←) would solve this. Which
> me of the fact that I would have loved having a language like python that
> uses more of unicode for its syntax.
> Then "python" might look like:
> ∀ n ∈ names:
> if n ≠ "foo":
> α ← n
> ß = re∘search〈"foo", α〉
> No more overloading of parens, decimal dots, minus signs, etc.
> Of course it would take some time to learn how to type all these chars on
> the keyboard, but by some clever editors macro tricks, you would quickly
> over this.
> Here's another pythonic construct that imo would look nicer.
> f← λ x: x↑2
> But I'm dreaming. Nobody will ever do anything as crazy as this... ☺
> On Thu, Jul 1, 2010 at 15:28, Amit Aronovitch
>>> On Thu, Jul 1, 2010 at 2:48 PM, Ahik Man wrote:
>>>> What do you think about this code:
>>>> for n in range(2, 10):... for x in range(2, n):... if n %
x == 0:... print n, 'equals', x, '*', n/x...
break... else:... # loop fell through without finding a
factor... print n, 'is a prime number'
>>>> I don't like this 'for - else' trick. IMHO it's confusing and not
>> I really like this (very natural) programmatial construct.
>> I use it all the time, and feel handicapped in languages such as C,
>> you have to define an extra boolean flag and manually set/check it to
>> achieve the same result.
>> As for the choice of keywords, it is not that bad (maybe just got used
>> to it after years of usage), but I agree the semantics might not be
>> to unaware readers. Certainly not up to Python's praised readability
>> Personally, I don't like the choice of '=' as the syntactical marker
>> name-binding. It makes people think it is an operator, and expect c-like
>> semantics. Source of endless bugs for newbies and repeated
>> in mailing lists.
>> Well, the advantage of having a BDFL is that someone is in charge of
>> making such choices and we do not have to argue about this any more.
>> other option is to try to keep everyone happy by supporting several
>> of the syntax (works fine in Perl, but takes its toll in readability
>> Python-il mailing list
>> [email protected]
> Python-il mailing list
> [email protected]