4 ms·
VERY opinionated to put it softly. "Dynamic typing is bad, and anyone who disagrees with me probably hasn’t written enough software to realize it yet." I am w
by adontz 5y ago
VERY opinionated to put it softly.
"Dynamic typing is bad, and anyone who disagrees with me probably hasn’t written enough software to realize it yet."
I am writing software for more than 20 years already, I have written in Assembly, Bash, C, C++, C#, D, Java, JavaScript, Lua, Pascal, PowerShell, PHP, SQL, Zig.
Dynamic typing is must have for any large enough software project. You either have it in language itself, or include scripting extensibility, or invent a bicycle with some kind of reflection. No modern user interface library works without dynamic typing.
- cosmotic 5y agoWhat do you consider a modern user interface library? I feel like all the interface libraries for C++, Java, and .NET are strongly typed.
- adontz 5y agoThey are not, because you need dynamic typing for data binding. One does not rebuild UI library to use custom models. It is done via reflection and code generation.
- adontz 5y agoAnd to make it clear, if you pass method/attribute/property/field names here and there as strings, you have some kind of dynamic typing. QML, XAML, Jinja, Handlebars, Razor, everything is dynamically typed and more than this, duck typed, because one rarely needs to implement some kind of interface, except maybe basic dynamic typing support, like QObject, INotifyPropertyChange or DependencyObject.
- cosmotic 5y agoCan you explain how Razor is dynamic? Do you have an example? Last I used Razor, you defined the statically-typed model at the start of the file then had strongly typed references throughout the page.
- adontz 5y agohttps://github.com/dotnet/aspnetcore/blob/8b30d862de6c9146f466061d51aa3f1414ee2337/src/Mvc/Mvc.Razor/src/Compilation/DefaultViewCompiler.cs https://github.com/dotnet/aspnetcore/blob/8b30d862de6c9146f4...