Re:Representing Type Lattices Compactly
by tekknolagi on Tuesday March 11, 2025 @12:18PM
(#43334028)
This is not about surface level typing. This is about compiler internals.
Re:Representing Type Lattices Compactly
by tekknolagi on Tuesday March 11, 2025 @12:38PM
(#43334256)
I added a couple of sentences in the intro to clarify.
Re:Representing Type Lattices Compactly
by Dr_Incelheimer on Tuesday March 11, 2025 @12:50PM
(#43334444)
>filtered by Python types
lmaooo sub-2σ golem detected
Re:Representing Type Lattices Compactly
by __MatrixMan__ on Tuesday March 11, 2025 @04:47PM
(#43336845)
I don't think there will be a movement away from type hints in python any time soon, they're too useful as guardrails for an LLM. But even without using an LLM I'm definitely faster with type hints enforced because I can just sort of feel around with autocomplete. Sure, the transition sucks, but once you're there the benefits start stacking up pretty fast.
Re:Representing Type Lattices Compactly
by cobertos on Wednesday March 12, 2025 @01:53AM
(#43340304)
Duck typing requires the primitives of the properties to also be typed. This is a building block you must built to build up to duck typing.
I'm also unsure how you would represent a "list of list of errors" succintly without calling it just that. A list of a list of errors. An `Error[][]`. How would "duck typing" as you describe make this type somehow less complex?
It all reads so technical and long and mathematically academic but it’s just a bit mask.
I absolutely hate writing python now because I have to reason about a “list of list of errors” type defined by a teenager and they get mad at me if I don’t then define a new “list of list of errors, or none” type when I manipulate it. You guys are now employed by VSCode to make those hints look beautiful. VSCode is your boss now and your job is to make VSCode happy
I predict that in five years we will retvrn to duck typing in the same way that we are now retvrning to server side rendering and running on bare metal. Looking forward to the viral “you don’t need compound types” post on here. “Amazing - you can write code which does normal business tasks without learning or ever thinking about homotopy type theory”
Yes I get it if we are writing embedded code or navigation systems or graphics or whatever, please help yourself from the types bucket. Go ahead and define a dictionary of lists where one list can contain strings but all the other lists either contain 8-bit integers or None. But the academic cachet of insanely complex composable type systems bleeds through into a web server that renders a little more than “hello world” and it ruins my life