3 ms·
Just the other day I had a look at a friend's customer Angular project. My eyes! I knew Angular from past experiences, but once again it stuck out to me that An
by tannhaeuser 7y ago
Just the other day I had a look at a friend's customer Angular project. My eyes! I knew Angular from past experiences, but once again it stuck out to me that Angular devs tastelessly found it necessary to equip HTML with additional meta-syntax such as parens and asterisk as part of attribute names. Now I can get that some people dislike markup languages (SGML/XML), but going in there and invent a whole new syntax on top when SGML already has plenty (arguably even too much already, to the point that W3C found it necessary to invent the XML subset of SGML) just tells me Angular is made by people full of Java-ish MVC world-views but complete lack of awareness of prior art and established practices in the field. A similar thing is happening with HypeScript: bending a weakly-typed language to fit an outdated and obsolete OOP mindset when JavaScript has eg closures for modularizing event handling.
- tashoecraft 7y agoI probably wouldn't go around discrediting a large group of extremely knowledgeable devs with extensive experience. My opinion is generally, if I see something a ton of people have spent countless hours building and I think it's stupid, I should atleast think about why. Angular uses parens to bind to existing element classes, so if you use an html element, and it has a src field, you want to pass a string just do the normal src="string" you want to pass something from javascript [src]="variable". Boom, you just learned the biggest part of angular template syntax, congrats. This allows for using any existing element, or newly developed elements, web components, without worry about clashing, (jsx class...). I do agree they went a little to heavy with OOP thinking, it's a weird balance between the functional reactive pushed by rxjs, and a more classic OOP line of thinking. I believe Angular will move more towards a functional way of developing as the team is coming off of the rendering refactor, ivy, and the community is working on the functional reactive component.