recommends of redesign OO feature of python !!!

2018-10-24 Thread iamybj--- via Python-list
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


Type hinting of Python is just a toy ?

2019-01-04 Thread iamybj--- via Python-list
I read that pep 484 type hinting of python has no effect of performance, then 
what’s the purpose of it? Just a toy ?

Python is an old programming language, but not better than other programming 
languages, then what are you all dong for so many times ? 

Pep484 is too complex. Typle should not a seperate type, in fact it should be 
just a class. Like this in other programming language
Python: Tuple(id: int, name: string, age: int)
Other: class someClass {
public int id;
public string name;
public int age;
}

Design of OOP of python is too bad, so it treat Tuple as a seperate type.

Why looks different than others? afraid of cannot been watched by others?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Type hinting of Python is just a toy ?

2019-01-04 Thread iamybj--- via Python-list
In fact, there is only 3 types in all prigramming languages.
Primitive type: int, string, bool, char
Complex type: struct or class
Array Type: int[10], string[100], struct[1000]

These 3 type can represent all thins in the world.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Type hinting of Python is just a toy ?

2019-01-04 Thread iamybj--- via Python-list
{ id: 1, name:’abc’, age:99, address:{province:’CA’, city:’SA’}}

Can be represent by:

Class Address {
public string province;
public string city;
}

Class Person {
public int id;
public string name;
public int age;
public Address address;
}
-- 
https://mail.python.org/mailman/listinfo/python-list