News for hackers. Stuff that matters.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by xvilka on Wednesday April 14, 2021 @09:42PM (#26815296)
Someone who needs types could just write in a strongly-typed language.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by dr_zoidberg on Wednesday April 14, 2021 @10:08PM (#26815452)
Python is strongly typed. It's also dynamically typed. They are not contradictory between each other.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by cbarrick on Wednesday April 14, 2021 @11:50PM (#26816020)
My ELI5 for this has always been that static vs dynamic concerns variables; strong vs weak concerns objects.

- Static + Weak = C

- Static + Strong = Haskell

- Dynamic + Strong = Python

- Dynamic + Weak = JS

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by codethief on Thursday April 15, 2021 @09:07AM (#26819977)
> strong vs weak concerns objects

and, in particular, explicit vs. implicit type casts of those objects.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Y_Y on Thursday April 15, 2021 @09:30AM (#26820217)
But C and Haskell don't really have objects...
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by cjfd on Thursday April 15, 2021 @12:45AM (#26816279)
It is strongly typed in the sense that 3 + "5" is an error. It also has duck typing which is weak. So, which is it? I would say it is more weak than strong.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by NoThisIsMe on Thursday April 15, 2021 @01:06AM (#26816361)
There are two axes: strong/weak and dynamic/static.

Examples:

Python: strong, dynamic

PHP: weak, dynamic

C: weak, static

Haskell: strong, static

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by zo1 on Thursday April 15, 2021 @04:53AM (#26817862)
Duck-typing doesn't imply weak typing, but rather dynamic typing. Can you explain why you consider dock-typing as being weak-typing?
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by solumos on Wednesday April 14, 2021 @11:42PM (#26815982)
I once had someone try to tell me that python was "untyped" - I guess people assume a lot when they come from a first-class statically-typed language.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pmontra on Thursday April 15, 2021 @02:28AM (#26816777)
I wonder if my professor of the Programming Languages course at university would laugh or cry at such a definition.

I expect that everybody doing this job has a CS or equivalent degree and knows the difference between strong / weak and static / dynamic typing. Reading other comments here demonstrates this is not the case. This is not a bad thing (luckily we only need a screen and a keyboard) but hopefully they'll have learned something new today.

Btw, there is a lot I don't know despite my degree. No hard feelings.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by exdsq on Thursday April 15, 2021 @03:09AM (#26817040)
“Untyped” is the phrase used in literature too

https://www.sciencedirect.com/science/article/pii/S147466701...

Practically, untyped languages would include asm and forth.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by kstrauser on Thursday April 15, 2021 @01:27AM (#26816457)
In Python, objects have types. Variables are best thought of as void* pointers to objects.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by dr_zoidberg on Thursday April 15, 2021 @09:49AM (#26820470)
I've found over the years that people have an easier time understanding how Python manages variables when you tell them that, rather than "in-memory boxes with data" as is the case in other languages, Python variables are more like "name tags that you attach to an object".
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Spivak on Thursday April 15, 2021 @10:27AM (#26820910)
Pointers that also carry the underlying type information.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by kstrauser on Thursday April 15, 2021 @10:55AM (#26821233)
I don’t remember what the CPython implementation looks like, but even if the information is there, it’s not really exposed to end users. “type(foo)” doesn’t return the type of the name “foo”, but of the object that “foo” points to.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Spivak on Thursday April 15, 2021 @11:59AM (#26822121)
I meant that it's a pointer that is aware of the type of object it's pointing to by virtue of all objects knowing their own type. Same difference I guess.

Unlike void pointers or Object references in Java you can't "forget" an object's type.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by kstrauser on Thursday April 15, 2021 @02:16PM (#26824203)
Ah, I think I see what you mean. I still think it's more accurate to say that names are just pointers that don't have any typing info themselves (or if they do, it's an implementation detail that doesn't actually get surfaced and isn't a part of the language definition). In Python it doesn't quite make sense to talk about the type of a "name" or "variable" or "pointer" because, because it points to an object, and that's where the canonical type info actually lives.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by guram11 on Thursday April 15, 2021 @02:12AM (#26816681)
iirc untyped is not incorrect, untyped lambda calculus for instance is where your value type is unknown until your runtime like dynamic type, untyped doesn't mean you don't have type in your language
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by lmm on Thursday April 15, 2021 @01:49AM (#26816565)
There's no such thing as "dynamic types". A type is by definition associated with an expression in a language, but those expressions are part of the program's static source code. Python has some kind of checking of the runtime values involved in certain operations, but that's not typing.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by HelloNurse on Thursday April 15, 2021 @06:05AM (#26818449)
Types are not associated with expressions in Python: evaluating an expression produces a typed value, whose type, and not only its value, depends on the type and/or values of the inputs. Example:

   def comparativeInsult(a,b):
      if b>a:
         return "try again"
      if a>b:
         return a/b
      else:
         return None
The type is, for all practical purposes, a part of the value of a Python object.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by lmm on Thursday April 15, 2021 @08:12AM (#26819453)
Such a thing is not a type. Not by the usual definition, which predates not only python but mechanical computation.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by benrbray on Wednesday April 14, 2021 @10:31PM (#26815578)
Everyone needs types. Here's one of my favorite quotes:

> "Dynamic typing" The belief that you can't explain to a computer why your code works, but you can keep track of it all in your head.

— Chris Martin (https://chris-martin.org/2015/dynamic-typing)

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Wednesday April 14, 2021 @11:08PM (#26815814)
> Here's one of my favorite quotes

Here's my response to that quote:

"Static typing": The belief that if your code type-checks correctly, it will do exactly what you intended. (A variant of the belief that if your code compiles correctly, it will do exactly what you intended.)

Of course, taken literally, that's unfair, but so is the quote you gave. Everything you add to your code has a cost. Time you spend writing type specifications is time you're not spending doing something else that might add more value. Sometimes writing type specifications is the best use you can make of that time; sometimes it isn't. Python at least gives you both options: use type annotations if you want, but you don't have to if you don't want to.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by lmm on Thursday April 15, 2021 @01:45AM (#26816540)
> "Static typing": The belief that if your code type-checks correctly, it will do exactly what you intended.

No-one claims that typechecking solves 100% of problems. But it has a higher cost-benefit than anything else that's been tried.

> Time you spend writing type specifications is time you're not spending doing something else that might add more value.

So is time you spend thinking about the behaviour of the code in your head - the main difference is that it's slower and more error-prone.

Occasionally you really can do the calculation about what kinds of expressions are valid in which places better than the computer. But that's a rare case that gets rarer every day.

> Python at least gives you both options: use type annotations if you want, but you don't have to if you don't want to.

Not really: your code will almost always be silently unsound. E.g. libraries you're using will usually have incorrect type annotations (because their type annotations aren't checked, and the checker is unsound even if they were).

In contrast if you use say Haskell you genuinely do have both options: you can write code and have it be safely typed, or you can call unsafeCoerce at any point where you don't want typechecking to happen.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Thursday April 15, 2021 @03:36PM (#26825177)
> it has a higher cost-benefit than anything else that's been tried

I would want to see a lot of data, for a lot of different kinds of programs, to back up this claim.

> So is time you spend thinking about the behaviour of the code in your head

You have to do this anyway; static typing doesn't write your code for you. Even Haskell, which I will freely admit is probably the closest thing to an AI that I've ever seen in a programming language, can't do that. :-)

> your code will almost always be silently unsound

Code that has type annotations has this same problem. That was the point of my response: static typing != sound code.

> libraries you're using will usually have incorrect type annotations

They can't be incorrect if they aren't there. The comparison I'm making is not between code with correct type annotations and code with incorrect ones. It's between code with type annotations and code without any of them at all.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by lmm on Sunday April 18, 2021 @10:34PM (#26858634)
> You have to do this anyway; static typing doesn't write your code for you.

The amount is what matters. If spending x minutes writing down types saves you y minutes of thinking, and y>x, that's a win.

> Code that has type annotations has this same problem. That was the point of my response: static typing != sound code.

Well-typed code has certain soundness properties - they may not fully encode all the properties you want your program to have (that part is up to you), but the properties that you have encoded will be reliable. Optional typing undermines that: even if the types say one thing, you have no guarantee that that thing is true.

> They can't be incorrect if they aren't there. The comparison I'm making is not between code with correct type annotations and code with incorrect ones. It's between code with type annotations and code without any of them at all.

My point is that if the ecosystem is not well-typed then you don't actually have the choice of using types. What I'm arguing against is your claim that Python gives you the choice: it doesn't, because to be able to write well-typed code you need well-typed libraries.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Friday April 16, 2021 @01:52AM (#26830032)
> > So is time you spend thinking about the behavior of the code in your head

> You have to do this anyway; static typing doesn't write your code for you. Even Haskell, which I will freely admit is probably the closest thing to an AI that I've ever seen in a programming language, can't do that. :-)

I think what he meant to say is that you spent 95% of your time to think about: "what is the kind of think I can from this method call and how can and should I use it and what should I return in the end". Writing down the result of your thoughts takes almost no time in comparison. Not only that, in good statically typed languages, you don't have to write down the types explicitly most of the time (but you can still have your IDE show them to you if you want to see them).

And in addition to that, you certainly have to think _less_ in many cases. A good example are functions that return lists. Often you always have an element in the list. Using a good type-system, it will be indicated, so when I get the list, I know that I don't have to handle the case that the list is empty. In python I would often have to think _more_ about it and look into the documentation or maybe even the implementation to understand if it could return an empty list or not.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Friday April 16, 2021 @04:05PM (#26838488)
> you spent 95% of your time to think about: "what is the kind of think I can from this method call and how can and should I use it and what should I return in the end". Writing down the result of your thoughts takes almost no time in comparison.

The issue here isn't static vs. dynamic typing, it's API documentation. In cases where static type declarations work out to be sufficient as API documentation, sure, use them as API documentation. But the "time to think" issue isn't being solved by static typing; it's being solved by having good documentation for the APIs you are using (or writing good documentation for the APIs of the libraries you are writing).

> A good example are functions that return lists. Often you always have an element in the list. Using a good type-system, it will be indicated, so when I get the list, I know that I don't have to handle the case that the list is empty.

Same comment here: whether or not the function can return an empty list is part of the API. The API needs to be documented somehow. A static type declaration might be enough, or it might not. Either way, what's solving the issue isn't static typing, it's API documentation.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Friday April 16, 2021 @10:23PM (#26841124)
Let me quote your original claim again:

> Time you spend writing type specifications is time you're not spending doing something else that might add more value.

To what I say: writing out a type (= a few characters) is negligible anyways when compared to the time you spend thinking about what the type is (which you have to do in python as well, maybe even more).

> Same comment here: whether or not the function can return an empty list is part of the API. The API needs to be documented somehow.

If you have a proper API documentation in both cases, then you have to think less, that's true. In the real world however, I can testify that I have to think longer in python because 1) APIs not always well documented and 2) even if they are, a well documented API that uses statical types is still easier to use due to the automatic compiler/IDE support.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Saturday April 17, 2021 @01:47AM (#26841872)
> writing out a type (= a few characters) is negligible anyways when compared to the time you spend thinking about what the type is

Writing out a type is only a few characters if it's a type that's already built into your type system. (In which case, as others have already pointed out, you probably won't have to write it anyway in a statically typed language because the type system will automatically infer it. But in such cases, you're not gaining any documentation benefit from it.)

If it's a type you're having to invent as part of writing the code, writing it out everywhere it gets used can be a lot more work.

> I have to think longer in python because 1) APIs not always well documented

Meaning, not well documented compared to APIs in other languages? That hasn't been my experience; my experience has been that API documentation pretty much sucks everywhere.

> a well documented API that uses statical types is still easier to use due to the automatic compiler/IDE support

If you use an IDE, perhaps. (I don't; I find that they cost me more than they save me.)

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Saturday April 17, 2021 @09:14PM (#26848934)
> Writing out a type is only a few characters if it's a type that's already built into your type system.

Right, but if it is not, then you also have write extra code in python (e.g. create a new class).

Of course alternatively you can also just use "String" for everything (you can do that with a statical typesystem too), but I hope you agree with me that this isn't a great idea in any language.

I also have the feeling that you might change your mind if you try out a modern fully fledged IDE with a good statically typed language. The reason why I think this is because of things that you said such as "But in such cases, you're not gaining any documentation benefit from it." which are correct if you are not using an IDE. But if you do, it's actually wrong. IDEs like IntelliJ can be configured to show all (or only certain) types that are not written in text but that the compiler infers - without pressing any key. I like to use this feature a lot when diving into an unknown code base.

> Meaning, not well documented compared to APIs in other languages?

No, just not being well documented. Many popular libraries in python are well documented, but not all are. And the less popular/public ones are often poorly documented. The same is true for other languages as well, but in those, you at least you often have a "basic" documentation through the types.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Sunday April 18, 2021 @05:45PM (#26856729)
> if it is not, then you also have write extra code

In any language, not just Python. A type that isn't already built-in has to be defined in your code no matter what language you are using.

> I hope you agree with me that this isn't a great idea in any language.

Of course it isn't. Different types exist for good reasons.

> I also have the feeling that you might change your mind if you try out a modern fully fledged IDE with a good statically typed language.

I doubt you would have this feeling if you knew how many times I have tried "a modern fully fledged IDE with a good statically typed language". And every time has ended up the same.

> IDEs like IntelliJ can be configured to show all (or only certain) types that are not written in text but that the compiler infers

This is a fair point, but in a language like Python this could be provided as a library function if it were needed. (Python already has the "help" built-in function that shows you the documentation for whatever object you pass it as an argument, at the Python interactive prompt. Inferred types could be handled the same way if Python had them.)

> at least you often have a "basic" documentation through the types

Which might be significant useful information. Or it might not. It depends on what kind of code you are dealing with. It's quite possible that the particular kind of code I have dealt with has simply not been the kind where static typing is much of a help, and that there are other kinds of code where it is. But the original claim that I responded to was "Everyone needs types" (by which was meant "everyone needs static typing"). It is that blanket, general claim that static typing is always better that I was disputing, not the claim that static typing can be helpful in some cases.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Sunday April 18, 2021 @07:24PM (#26857528)
> In any language, not just Python. A type that isn't already built-in has to be defined in your code no matter what language you are using.

Yeah exactly! So it's the same for every language. I just don't understand why you then say that I would have to type more in a statically typed language.

> I doubt you would have this feeling if you knew how many times I have tried "a modern fully fledged IDE with a good statically typed language". And every time has ended up the same.

Everyone is different and that's one reason why people choose different tools and languages. Nothing wrong with this - one of the best developers that I know uses vim for everything. I on the other hand would not be productive without a good IDE.

> But the original claim that I responded to was "Everyone needs types" (by which was meant "everyone needs static typing"). It is that blanket, general claim that static typing is always better that I was disputing

Fair enough, I agree with you on that one. The thing I disagree with is that is static typing requires (always) more effort when writing code. For Java this is totally true, but for many other languages, my experience is that I neither have to type more nor that I have to think more.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by dragonwriter on Sunday April 18, 2021 @06:00PM (#26856882)
> If it's a type you're having to invent as part of writing the code, writing it out everywhere it gets used can be a lot more work.

Not really; you write it out fully once, when creating a type alias/definition, and then just use the name later.

> Meaning, not well documented compared to APIs in other languages?

Yeah, I’ve found Python to have a pretty good documentation culture (docstrings especially facilitate this), often better than some statically typed languages with ecosystems where signatures are regularly mistaken for adequate documentation.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Friday April 16, 2021 @04:07PM (#26838501)
> In python I would often have to think _more_ about it and look into the documentation or maybe even the implementation to understand if it could return an empty list or not.

In many cases in Python, you don't have to care. For example, if you're going to iterate over the list, Python will iterate over an empty list just fine: it will execute zero iterations. No need to check anything.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Friday April 16, 2021 @10:25PM (#26841136)
Right. I was referring to the cases where you must care, such as presenting a list of errors to someone or doing a calculation where an empty list must be considered in a special way if it occurs etc.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by momentoftop on Thursday April 15, 2021 @05:51AM (#26818337)
Chris Martin is a Haskeller, and so will spend hardly any time writing type specifications. He'll let the compiler infer them.

I'm very enthusiastic about static types with global type inference, where I don't have to write a single type annotation if I don't want to. My enthusiasm degrades pretty quickly the more annotations I have to manually clutter my code.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by IgorPartola on Wednesday April 14, 2021 @11:50PM (#26816025)
This. Can also be applied to unit testing: the belief that if your code passes its unit tests, it will do exactly what you intend.

I see way too many code bases that test things that are easy and xfail things that are hard because it turns out that you can’t just test your way to a complex product, but you sure can make yourself feel good by testing the fact that a dict acts like a dict.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by benrbray on Thursday April 15, 2021 @01:29AM (#26816469)
I see your point, but I do think the amount of time spent writing type specifications is (usually) negligible, in return for an extremely large benefit whenever the code needs to be read by you or someone else later.

I would certainly argue that anyone who writes a library, whose public API will be consumed by hundreds or thousands of people, should always include type annotations.

After working in a TypeScript codebase for so long, it's jarring to return to Python or even vanilla JavaScript where I no longer have breadcrumbs to help me keep track of how the code is organized.

Python's type annotations leave something to be desired, in terms of how easy they are to include in code and how well the tooling supports them. I'd almost rather see something like "Typethon" with better syntax+soundness that compiles-to-Python.

Types are an optional tool, sure, but they're one of the most valuable tools we have to catch (not eliminate entirely) bugs and hasten development (without introducing errors).

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by aranchelk on Thursday April 15, 2021 @01:38AM (#26816511)
> The belief that if your code type-checks correctly, it will do exactly what you intended.

With a little care and a sufficiently strong type system it’s surprising how often this is actually true.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pmontra on Thursday April 15, 2021 @03:15AM (#26817095)
This is the last bug I had to fix. Scenario: a credit transfer marketplace. When we auction an invoice, we snapshot the data about all the involved parties and show those data in all the screens about the invoice. However some of those screens didn't show the stored data, they showed the current ones, which is useless and very wrong. I know which tests can catch that bug but I wonder what type system could catch it at compile time. To make it worthwhile it must be easier than writing the test. We can stop at the JSON generation. No need to look into the React frontend.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by aranchelk on Thursday April 15, 2021 @06:22PM (#26826899)
That sounds like a pretty frustrating bug to try to find and fix. No type-level feature that I'm aware of could prevent this issue directly. What you're describing is pretty high-level business logic. While I've seen some pretty impressive demos with dependent types, nothing that I know of could handle this.

I don't know much at all about the structure of your application, and it's hard to speculate, but what strikes me is your live and snapshotted data have the same shape/type and seem to be interchangeable for the compiler/interpreter, but are very different to you and your customers. The engineer creating that screen may have had the forethought at the outset to say "this should never deal with live data, only snapshots", so that warning probably gets put in a comment, but there's very little to stop someone from later passing in the live data that you definitely don't want.

There's a feature in Haskell (and similar languages e.g. PureScript) called newtype declarations. They're a lightweight way you can tag and optionally limit access to your data. You essentially tell the compiler "this is a new and distinct type that can wrap the original one". The original and newtype are not interchangeable, and an attempt to do so won't compile.

Having that feature I'm in the habit whenever I recognize overloaded meanings encoded with the same type (e.g. live/snapshot) of wrapping one of them in a newtype, and before I even implement application logic, I write out the signatures and specify which type I actually want. They add a bit of tediousness, but they have saved me many times, and I've never regretted using them.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pmontra on Friday April 16, 2021 @10:26AM (#26834279)
Thanks, maybe we can build something along those lines even if we're using a totally different language (Elixir backend, JSON to a React frontend).

That is an administrator console. Sometimes we do have the foresight to understand what our users actually want but in a large system inevitably happen things like "it was obvious to us" or "after months of use we realized that it's better to do this way", etc.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by samhh on Friday April 16, 2021 @12:11PM (#26835710)
You can do the same in TypeScript with newtype-ts. I'd recommend it for the same reasons you'd use them in Haskell et al.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by KMag on Thursday April 15, 2021 @06:08AM (#26818462)
Depending on how your code is structured, phantom types might work for your use case. They're useful for tracking metadata about the values being passed around, even though the methods and fields don't differ between your use cases.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pmontra on Friday April 16, 2021 @10:30AM (#26834336)
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by dehrmann on Wednesday April 14, 2021 @11:43PM (#26815985)
I can't seem to find the exact quote, but

> Dynamically typed languages are actually statically typed with precisely one type: hash table.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Spivak on Thursday April 15, 2021 @10:36AM (#26821038)
This doesn't describe Python at all though. In Python objects have some data structure (usually a dict but not necessarily with __slots__) that hold the object's attributes but that's not the whole identity of the object.

Because by this definition makes C++ and Java look dynamic with vtables.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by dehrmann on Thursday April 15, 2021 @12:40PM (#26822806)
True; it's a better description of Javascript.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Spivak on Thursday April 15, 2021 @10:29AM (#26820952)
Dynamic typing is just "objects have types but variables don't" which is far less controversial.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by coldtea on Thursday April 15, 2021 @04:54AM (#26817878)
He should stick to songwriting...
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by seanmclo on Wednesday April 14, 2021 @10:05PM (#26815440)
Unfortunately, this isn’t always an option if you need to use a library that’s only available in Python.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by xvilka on Wednesday April 14, 2021 @10:29PM (#26815564)
It's possible to use it in a Julia-like fashion (like PyCall.jl[1]). For example, with OCaml one could use Pyml[2].

[1] https://github.com/JuliaPy/PyCall.jl

[2] https://github.com/thierry-martinez/pyml

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by coldtea on Thursday April 15, 2021 @04:52AM (#26817857)
Only if they don't also need X other things that Python provides and the other language doesn't...