|
|
|
|
|
by DNF2
1240 days ago
|
|
> In that regard, Julia code reads like someone’s manuscript about the issue and not a program written by a programmer. To you, that’s desired. To me, that’s my actual worst nightmare That's a pretty dubious attribution of intention, though, that I desire this. I want clean, maintainable code. > You mention not taking all argument types, it’s just so stereotypically mathematician of an assumption that the code will just work with whatever garbage you send it. But that's not what I said, and it's not what multiple dispatch means. You are talking about generic functions and duck typing -- essentially, code that has no type restrictions. Multiple dispatch means that types of all arguments are considered, and you are free to be as restrictive as you wish. You can specifically and concretely type every single input, and probably make the code much more predictable and to your liking. The amount of genericity vs type safety is a trade-off between different advantages, and you have a lot of freedom to choose. |
|