Remix.run Logo
Pay08 3 hours ago

Dynamic typing is neat, I actually prefer it to static typing. Most people who think they have a problem with dynamic typing actually have a problem with weak typing.

choeger 3 hours ago | parent | next [-]

Dynamic typing is no typing.

The point of types is to prove the absence of errors. Dynamic typing just has these errors well-structured and early, but they're still errors.

Pay08 2 hours ago | parent [-]

Errors that you can recover from. I simply appreciate the added flexibility. Have you ever tried making a container of arbitrary types in C++?

lmm an hour ago | parent [-]

If C++ was the only static type system I'd experienced, I would also think it was a bad idea. Have you ever used an ML-family language?

Pay08 an hour ago | parent [-]

Nope. Closest thing I have used was probably Haskell.

lmm an hour ago | parent [-]

Haskell ought to be good enough. Did you struggle with making your containers there?

Pay08 an hour ago | parent [-]

Interestingly enough, I have never needed them there. Granted, I have written a few orders of magnitude less Haskell than I have C++. Still, the difference is worth interrogating (when I'm less sleep deprived).

teaearlgraycold 3 hours ago | parent | prev | next [-]

Yes to dynamic typing. Yes to static analysis.

Pay08 2 hours ago | parent [-]

What?

antonvs 3 hours ago | parent | prev [-]

Technically, in a type theory context, there’s no such thing as “dynamic typing”. Types are a static, syntactic property of programs.

The correct term for languages that don’t have syntactic types is “untyped”.

> Most people who think they have a problem with dynamic typing actually have a problem with weak typing.

All people who say things like this have never studied computer science.

_flux 2 hours ago | parent [-]

The term unityped is used as well, and at typing level this also makes sense: you have one type called object, you put that object alongside the value object ("tag"), and then at runtime all operations on that object check if its type object provides the operation the code is trying to apply on it (or maybe each value object directly knows the operations it supports). I think I prefer this term.

"syntactic type" is a weird term to me, though. Is that in common use?