4 ms·
C is likely the only example of a programming language that is clearly statically typed while at the same time being weakly typed. For a reason: as your example
by brabel 2y ago
C is likely the only example of a programming language that is clearly statically typed while at the same time being weakly typed. For a reason: as your example shows, it's a really bad idea (but understandable for a language from the 60's).
- layer8 2y agoC is from the 1970s. Java is weakly typed in its generics, despite being statically typed. I’m sure there are more examples.
- deleted 2y ago[deleted]
- brabel 2y agoI don't think Java is weakly type even in generics. You can't "fake" your way with types like in C, you need to explicitly cast, which fails if you try to make an invalid type cast.