Re:Introducing PyScript (summary of PyCon keynote)
by __alexs on Thursday June 23, 2022 @08:07AM
(#31847894)
Yeah there's a lot of weird design choices in JS code. I'm not sure all of them really make sense given the modern state of the language but old habits die hard.
Re:Introducing PyScript (summary of PyCon keynote)
by IshKebab on Thursday June 23, 2022 @08:39AM
(#31848188)
> This makes reading code really really hard as I can’t tell where some symbol is coming from.
That's why you use Typescript then you can just hover something or ctrl-click it.
Anyway Python is exactly the same in my experience. Sometimes people `import numpy as np` or whatever but most of the time they `from foo import X, y, z`.
Re:Introducing PyScript (summary of PyCon keynote)
by vasergen on Thursday June 23, 2022 @12:11PM
(#31851141)
I don't like more the default exports / imports. In this case one can import using completely different name and then it is even harder. Also it won't be changed while renaming utill the developer will go in all other places and do it manually
`import {foo} from ‘bar’;`
This makes reading code really really hard as I can’t tell where some symbol is coming from.
There also seems to be a general aversion against using classes to model types. Instead we have a host of functions that manipulate JSON/dataclasses, which means business logic is scattered around 10 different places!