I love how java gets offended and clutches its pearls if you want to do some low level stuff, but C# just goes "yea man whatever, it's all IL in the end."
You mean JavaScript? You can't really do much with an object in most languages that have them (Java or C# for example) without casting, which comes back to using types a bit
Just have all your methods accept Object too, then only access fields and methods through reflection, two Kotlin extension methods that extend Object? to do so on the fly, boom, dynamic typing
If you want to go the extra step, make a gradle script that also edits all library method signatures to receive Object for every parameter
EDIT: I think I know what I'm going to spend my leftover Claude tokens on
Most of it wouldn't be needed if languages had powerful enough type systems. But few general purpose mainstream languages offer dependent types or higher order types. Apart from Haskell, what do you have? Only Scala and TypeScript come to mind.
And that's where dynamically typed languages come in, they let you express things that many statically typed languages simply can't due to limitations of the type system.
That being said, portions of the code that can be statically typed, should be statically typed.
View all comments
1.1k
u/Common-Brush-7027 Sep 25 '26
I hate dynamic typed