@elyn Python types:
"Everything's an object, right"
"OK, sure"
"So type, the type of types, is a subclass of object"
"OK, ..."
"And object, since it's a type, is an instance of type"
"... wat?"
(the amount of "lying to computers" involved in starting a Python interpreter is genuinely fun, for a given definition of "fun")
@elyn Yeah, I advise folks to steer clear of the core type machinery implementation unless they actually *want* to stretch their brains into weird shapes in order to understand it. Lots of "this isn't quite true yet, but it will be true before it needs to be true, just trust us on that, computer".
I also love the fact that it is all completely *un*necessary knowledge for folks that just want to use Python without worrying about the fiddly details of how it works.
불러오는 중…
@ancoghlan I love fiddly details and non-euclidean neurology! It's good compilers don't appear to be conscious. I can't fathom the depths of their paranoia if they had to experience all the lies and coercion we put them through
@elyn @ancoghlan a lot of the python internal type machinery was added before python had spellable types, which now shows up as those strange breaks in the type math.
there's a similar case where `float` actually means `float | int`, so there's now no way of saying just float, no int, even though `isinstance(1, float) == False`.
@konstin @ancoghlan Maybe they should just change it, surely there's no historical precedent indicating that changing foundational design details would ever stifle adoption or fracture a community!
@konstin @ancoghlan That's genuinely really cool to know tho, thank u :D
@konstin @elyn Oof, I had managed to forget how much worse it all was before the classic class emulation bits were dropped, but that observation reminded me. I shudder to think how much harder it would have been to start defining type forms if those were still around (as you say, it's hard enough retrofitting a comprehensive description language to the status quo).
@ancoghlan @elyn I didn't mean to, but I have been in the past couple days, and I am not even working in anything conceptually complex 😅
@ancoghlan I have caught glimpses of the fuckery underlying python and it made me realise what a thin layer it is
#python
