3 ms·
Ruby is strongly typed. Dynamic typing and inferred typing are not the same as typeless. B and Forth are examples of typeless languages.
by Zambyte 2y ago
Ruby is strongly typed. Dynamic typing and inferred typing are not the same as typeless. B and Forth are examples of typeless languages.
- lolinder 2y ago"Strongly typed" is not a well defined term—it basically means "I'm personally comfortable with the level of guarantees offered by the language", which is a purely subjective measurement. In context it's obvious that what OP meant is that they wouldn't want to build in a language without statically-checked types. That there are languages that provide even fewer statically-analyzable guarantees than Ruby does not make Ruby a suitable candidate.
- cies 2y ago> "Strongly typed" is not a well defined term True. But it has boundaries. Strongly typed cannot be used for langs with implicit nulls. You need to do better than stock C, C++, Java or Go to be able to use the term. Rust, Elm, Haskell, Kotlin and OCaml come to mind.
- lolinder 2y agoNo, that's also entirely subjective. You feel that way, others don't.
- lelanthran 2y ago> True. But it has boundaries. Strongly typed cannot be used for langs with implicit nulls. You need to do better than stock C, C++, Java or Go to be able to use the term. That's, frankly, an insane boundary. According to you, all mainstream languages are untyped? Seriously?
- Zambyte 2y ago> In context it's obvious that what OP meant is that they wouldn't want to build in a language without statically-checked types. They should say that then. "Dynamically typed language" is not much harder to say or write than "typless language", but is correct instead of being incorrect. And that is a well defined term :)
- lolinder 2y agoMost academics would agree with them that dynamically typed languages are a misnomer and in fact have no type system. And whether you want to use the colloquial term that counts dynamically typed languages or the academic one that doesn't is a subjective decision, and one where their choice was clear from context. More generally, advocates of dynamically typed languages seem to want their languages to be considered typed because there's a developing consensus that typed is better. Unfortunately for said advocates, that consensus was not developed in contrast to languages like Forth, it was developed in contrast to languages like Ruby, so changing the definition of a type system to accommodate Ruby doesn't actually get you credibility in the new "cool kids club". You're better off arguing why dynamic is better than static than you are trying to enforce a particular definition of types. No one is going to be persuaded that Ruby meets their needs just because you made them use your definition.
- Zambyte 2y agoIncredible, I disagree with just about every point you made. We're not going to make any progress, have a good day.