3 ms·
You can get literally the same "simplicity" as a "dynamically typed" language through structural row-polymorphic types with type inference, i.e. static duck typ
by tsss 7y ago
You can get literally the same "simplicity" as a "dynamically typed" language through structural row-polymorphic types with type inference, i.e. static duck typing. Not to mention that the concepts of static and dynamic typing are orthogonal and there are languages that have both or neither.
You have no clue what you're talking about.
- socialdemocrat 7y agoBefore calling somebody clueless you have to understand the point they are actually making. I don't have the space to go into details in this comment. But you can read a more detailed explanation of what sort of simplicity I am talking about here: https://medium.com/@Jernfrost/the-many-advantages-of-dynamic-languages-267d08f4c7 https://medium.com/@Jernfrost/the-many-advantages-of-dynamic... It is not just about the simplicity of implementation but also about the simplicity you can create in your whole development environment and process. > You can get literally the same "simplicity" as a "dynamically typed" language through structural row-polymorphic types with type inference If you believe that, then I am sure you can point me to a language that does exactly this and let me try learning it myself and make up my own mind whether it is simple or not.
- IceDane 7y agoThat is an absolutely awful article. Example: > The same problem as before repeats itself. Complexity grows to a point that we yet again need a real language to do the job. A script language which allows us to write some code that explains how e.g. our C++ values should show up in the debugger. Not to mention that debuggers for statically typed languages themselves tend to grow into complex behemoths with a dizzying array of functionality to deal with the complexities of statically typed languages. This is just blatant nonsense and the author of the article clearly has no idea what a powerful static type system is capable of. If you want to get a feel for what structural typing can give you, you don't need to look further than TypeScript. If you want proper row polymorphism, you can try PureScript.
- socialdemocrat 7y ago> This is just blatant nonsense and the author of the article clearly has no idea what a powerful static type system is capable of. A complete non-sequitur. It does not refute the fact that most tools such as debuggers are customized with dynamic languages. The few times statically typed languages are used, it tends to be some kind of managed language where a lot of type info is retained at runtime. > no idea what a powerful static type system is capable of. If statically typed languages where so amazing and powerful then they would have been frequently used as extension mechanisms. They are not. Meta-programming also tends to be poorly developed in most statically typed language. The paradigm is just very limiting. > If you want to get a feel for what structural typing can give you, you don't need to look further than TypeScript I know structural typing from Go. If you think structural typing is a proper substitute for dynamic typing then you simply have not used a powerful dynamic language before. Or you have not learned how to use it properly. With dynamic typing you can easily manipulate types as objects. Structural typing does not give you that. You latch on to a completely superficial similarity and think it is somehow similar in capability and scope. The attitude you display is what makes a lot of the static typing fans kind of off putting. The smug superiority complex. I prefer dynamic languages but I recognize areas where static typing is preferable.
- tsss 7y ago> With dynamic typing you can easily manipulate types as objects There are statically typed languages like Agda in which types themselves are "first-class objects" whose types are "kinds" whose types are "sorts" and so on. They form a hierarchy of Russel universes where functions can be defined at every level of the hierarchy. Typical ambiguity even allows to define implicitly universe-polymorphic functions that work on terms of every universe, i.e. you can write a function that can be applied to values _or_ types _or_ kinds just the same.