Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My beef with XAML is it's a whole other language aside from C# into which the semantics of C# and WPF had to be mapped. Worse, the constraints of XAML affected the design of WPF itself. I.e. the tail wagged the dog.

If C# had hygienic macros, I think the syntax of C# could have been extended for WPF specific needs, without having to resort to an XML based solution.

With a few extension methods, C# can come close and sometimes exceed XAML in its concision. I've been collecting these in a FluentWpf (https://github.com/dharmatech/FluentWpf) project on GitHub.

An example: http://stackoverflow.com/questions/1347219/are-there-any-flu...



But XAML was intended from the start to play well with visual design-time tools, and C#-with-macros would probably have been too expressive to be roundtripped reliably through Blend and the VS designer.


C# with an ordained set of macro based extensions intended for use with WPF would work fine with a visual designer like Blend and the VS one. The visual designers would be the ones generating this code, so they'd know how to parse it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: