Re:Introducing PyScript (summary of PyCon keynote)
by lenkite on Wednesday June 29, 2022 @02:49PM
(#31924212)
Python beat Perl in the 90s-2010 era thanks to its readability which was always advertised as a supreme advantage. Of-course Python 3.x is more complex, but even as an occasional Python user who doesn't like Python that much, I can still dive into an OSS python project and understand what its doing with little prep or Googling needed.
Can't really say that for most programming languages with the exception of Go.
Re:Introducing PyScript (summary of PyCon keynote)
by davnicwil on Thursday June 23, 2022 @02:48PM
(#31853532)
Really interested in your experience with this.
What would you say it is about TypeScript that makes the code harder to read as it becomes more complex? Just the additional type annotation syntax, extra concepts like generics and/or the accompanying more exotic features of TS, the type definitions physically adding many lines of extra code, something about TypeScript that encourages code to be written in a certain way that is different and more complex?
Re:Introducing PyScript (summary of PyCon keynote)
by banannaise on Thursday June 23, 2022 @04:45PM
(#31854923)
As I remember, the biggest thing is the tendency of TypeScript to result in deeply nested code, which is very hard to read/unwind.
Note that I haven't touched TS in about two years now, so my memory is a little fuzzy.
Re:Introducing PyScript (summary of PyCon keynote)
by davnicwil on Thursday June 23, 2022 @04:51PM
(#31854992)
Would this be in a different way to the equivalent JavaScript code? Or do you just mean like physically, the layout of the code with the additional TypeScript syntax makes it appear more nested/indented and more difficult to parse?
Re:Introducing PyScript (summary of PyCon keynote)
by banannaise on Thursday June 23, 2022 @11:26PM
(#31857458)
TS doesn't really do any worse than JS in this respect; the key here is the difference between either of them and Python.
Re:Introducing PyScript (summary of PyCon keynote)
by davnicwil on Friday June 24, 2022 @03:33AM
(#31858745)
Ah, this is a facepalm moment in that I had completely misread the initial comment not as being a comparison of JS/TS to python, but of JS to TS then a further comparison to python. Now it makes much more sense!
I love JavaScript (yes, I'm one of THOSE people) and like what TypeScript brings to the table but it quickly becomes hard to read as the code becomes more complex.
Python has always had a readability advantage... up to the point where people start doing code golf and nesting multiple comprehensions together.