Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Thomas Jollans
On 2018-10-25 07:14, iamybj--- via Python-list wrote:
> Using dictionary as data model is the 20th century style,

[citation needed]



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Andre Müller
Troll detected!

If you don't like Python, don't use it. Very simple.
The concept of Python is good as it is.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python indentation (3 spaces)

2018-10-25 Thread Antoon Pardon
On 20-10-18 14:38, Peter J. Holzer wrote:
> On 2018-10-16 06:37:56 +1100, Chris Angelico wrote:
>> On Tue, Oct 16, 2018 at 6:34 AM Peter J. Holzer  wrote:
>>> On 2018-10-15 14:12:54 +0200, Antoon Pardon wrote:
 On 13-10-18 09:37, Peter J. Holzer wrote:
> On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote:
>> On 08-10-18 19:43, Peter J. Holzer wrote:
>>> In practice it doesn't work in my experience. There is always someone in
>>> a team who was "just testing that new editor" and replaced all tabs
>>> with spaces (or vice versa) or - worse - just some of them.
>> Isn't that caugth in the process of commiting to version control?
>  ^
>  Underlined to emphasize the context.
>
> Tabs are easy to catch. If a file contains a tab, reject it.
>
> Spaces aren't, because spaces are everywhere.
 Spaces that replaced a tab by accident, are easy to catch too. They are all
 those lines that show up when you do a diff with the previous version that
 shouldn't show up.
>>> And where is the AI that decides which lines in a diff are should show
>>> up?
>>>
>>> Whether a line in a diff should or should not show up seems to me to be
>>> even harder to determine than whether a tab fits the syntax.
>>>
>> If there's a change, it shows up. If there's no change, it doesn't show up.
>>
>> Ergo, if you accidentally replace a tab with spaces, it's a change,
>> and it shows up.
> If any change "shows up" (i.e., is rejected by the pre-commit hook of
> your version control system) you can't change anything which makes using
> a version control system rather pointless.

I just do a diff between the local version and the "latest" commited version.
If lines show up in the diff that don't looked changed, then there is a high
probablity someone replaced tabs with spaces. (Especially if there are a lot
of those lines.)

I regularly do such a diff anyway, because I try to avoid commiting changes
that involve multiple issues. And trying to avoid that can't be done 
automatically
either.

Maybe for some reason you don't consider this MO as easily catching spaces that
accidently replaced tabs. But it is easy enough for me.

-- 
Antooon 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Calvin Spealman
It does not appear that you actually want to use Python.

On Thu, Oct 25, 2018 at 1:15 AM iamybj--- via Python-list <
python-list@python.org> wrote:

> I am an engineer of java and c#, I want to some personal projects in free
> time, and I choose python.
>
> After try python, I hava some suggestion.
>
> The first thing is that python’s class is not well designed than other
> programming languages.
> Using dictionary as data model is the 20th century style, but now is 21t
> century.We usually use strong typed class to express a data model.
> For example,  the code presentation of a person in Java/c++/c# may be:
> public class Person {
> public String name;
> public String email;
> public int age;
> }
> The corresponding Python code:
> class Person:
> def __init__(self):
> self.name = None
> self.email = None
> self.gage = None
> It is very strange to define instance members of a class in
> constructor.Even the OOP feature of PHP is very like Java. Python's dynamic
> feature has lost control.
>
> Second, python is too complex.
> Python is an old programming language.At that time, enterprise programming
> style is very popular, witch like making simple things become complex, so
> force the costumer to pay more money.But now is WWW and Internet and Linux
> time, people like simple production and simple programming styles. Every
> new programming language wants to keep simple.
>
> Third, python is too slow.
> At the old enterprise programming time, performance is not a critical
> feature. If software runs too slow, customer have  to pay more money to
> enterprise software company to buy new hardware.
> Time changed, performance is very important now. Because the complex of
> python, the pypy project process very slow, and not widely used by people.
>
> Totally speaking, simple and performance are mostly required by this
> times. I suggest the python team should stop any new work, and start to
> rebuild a new python with simple grammar and better performance.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Daniele Forghieri

Il 25/10/2018 07:14, iamybj--- via Python-list ha scritto:

I am an engineer of java and c#, I want to some personal projects in free time, 
and I choose python.
After try python, I hava some suggestion.
The first thing is that python’s class is not well designed than other 
programming languages. Using dictionary as data model is the 20th century 
style, but now is 21t century.We usually use strong typed class to express a 
data model.For example,  the code presentation of a person in Java/c++/c# may 
be:public class Person {public String name; public String email;
public int age;}The corresponding Python code:class Person: def 
__init__(self): self.name = Noneself.email = None   
self.gage = NoneIt is very strange to define instance members of a 
class in constructor.Even the OOP feature of PHP is very like Java. Python's 
dynamic feature has lost control.
Second, python is too complex. Python is an old programming language.At that 
time, enterprise programming style is very popular, witch like making simple 
things become complex, so force the costumer to pay more money.But now is WWW 
and Internet and Linux time, people like simple production and simple 
programming styles. Every new programming language wants to keep simple.
Third, python is too slow.At the old enterprise programming time, performance 
is not a critical feature. If software runs too slow, customer have  to pay 
more money to enterprise software company to buy new hardware.Time changed, 
performance is very important now. Because the complex of python, the pypy 
project process very slow, and not widely used by people.
Totally speaking, simple and performance are mostly required by this times. I 
suggest the python team should stop any new work, and start to rebuild a new 
python with simple grammar and better performance.-- 
https://mail.python.org/mailman/listinfo/python-list



I completely agree with you.

For this reason I think that you should stop any new work and start to 
write your own language that, I'm sure, will encompass python in less 
than six months.


With best regards

--
https://mail.python.org/mailman/listinfo/python-list