#made my first two Python packages

1 messages · Page 1 of 1 (latest)

orchid kraken
inland zodiac
orchid kraken
#

the type checking fails with pyright for a weird reason I'm currently debating with the maintainers on github

inland zodiac
#

debating with maintainers

#

just making ur own version

hollow igloo
#

why are you even using python.

#

also

#

-100

#

overloading is cringe af

#

why would anyone do that

#

like

#

good luck making an Either (int | string) (int | bool) with overloading.

orchid kraken
hollow igloo
#

not to mention their types overlap

orchid kraken
#

oh right

#

yeah I guess you would have to do it some other way. If only I had implemented another way to construct Maybe values in this package…

hollow igloo
#

bro just be normal

#

and have separate constructors

#

having a single constructor is literally begging for confusion

#

not to mention having to do nasty inheritance breaking hacks

orchid kraken
#

I do have separate constructors

#

I just also have a merged constructor

hollow igloo
#

yeah the idea is

#

the merged constructor is a mistake

orchid kraken
#

k

hollow igloo
#

doesnt matter that you also have separate constructors

orchid kraken
#

also it doesn't break inheritance

hollow igloo
#

the merged one is still weird, and a footgun, and potentially unintuitive

orchid kraken
#

OK sorry, I liked the metaclass weirdness

hollow igloo
#

idk

#

i think as an exercise its fine maybe

#

but as you can probably see it does have issues

#

not least being that overloads and scripting languages don't really mix