4 ms·
What do you consider a modern user interface library? I feel like all the interface libraries for C++, Java, and .NET are strongly typed.
by cosmotic 5y ago
What 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...