3 ms·
> Go can make language (syntax) changes to improve this. Python has been very smart, and the type system is implemented as normal objects using the normal synta
by rantanplan 8y ago
> Go can make language (syntax) changes to improve this. Python has been very smart, and the type system is implemented as normal objects using the normal syntax
I will leave this tidbit here:
i, found = 0, False # type: int, bool
In any case, I find these new "typing" features very awkward, overly verbose and not the reason that I chose python in the first place. If I am to write all this non-pythonic stuff to be 10x+ slower, less memory efficient, awful at concurrency and still not having solved the packaging/deployment situation... I will just use Go. Or any other language in that league, that offers so many more nowadays.
- joshuamorton 8y ago> i, found = 0, False # type: int, bool That's actually i, found: Tuple[int, bool] = 0, False in python3. Which as I said, uses normal objects and normal syntax. As for the rest of your comment, I think that's been well discussed. There are a variety of non-typing reasons to use go over python. But if you are about type safety you're probably better off with modern python than modern go.
- rantanplan 8y ago> normal syntax. Right. Ok we have a problem with definitions. No this is obviously not normal syntax. Unless we take it to mean "whatever new syntax python introduces is normal syntax, since it supports it!", which is tautological and not very useful. I'm gonna say something, strictly so you can understand where I'm coming from, not to offend you. You sound very young. And by "young", I mean so young to not remember that Python was always about "duck typing" and not about strict types. I still have books on my bookshelf that tried to dissuade you from using "issinstance(foo, sometype)". So no, it's not python or normal syntax. Yes, Python now is safer than older Python. But I had 99 problems with Python and that wasn't one of them :( You, speaking as if Python is progressing so fast while Go is standing still, feels disingenuous. Go fixed their dep/packaging woes in a few years, Python is not even close. Go is adding generics. Go becomes faster in almost every release. Changing Python into something that doesn't resemble python, its values, or the reasons that people chose it in the first place doesn't make sense, nor does it make it "Python". I don't want Python to become Haskell, Rust or Go. No one ever chose python for its typing system! Rather its lack of it. Anyway, there's no accounting for taste and to each their own. Cheers