That's good to know. I wonder if VS and VS Code are set to at least produce warnings when the feature is used in human generated code. Any feature can be abused, will be abused. At least with warnings by default the programmer can know this isn't a desired use case and then decide if their particular need is a worthwhile exception.
Source generation is used at some level to implement expressivity at minimal runtime cost. It's just operating at a different level of abstraction to make different tradeoffs.
Whether you do Foo.Serialize() and it uses reflection to enumerate the properties, carries around tags permanently or it uses some compiletime generated function has nothing much to do with expressiveness.
If you design around a Foo<bar> does it matter if behind the scenes it generates a FooOfBar?
Should a language inherently care specifically about protobufs, flatbuffers, capnproto, etc because expressiveness or should it just have capable source generators for building strongly typed interfaces without the legwork? Are you sure an alternative implementation which is more expressive would be better or would it just be different?
> Whether you do Foo.Serialize() and it uses reflection to enumerate the properties, carries around tags permanently or it uses some compiletime generated function has nothing much to do with expressiveness.
Thinking those are the only options is exactly why the issue is expressiveness.
Code generators are used because run-time introspection tends to be slow(er) and because debugging code generated at runtime is harder and because IDEs don't know how to deal with code generated at runtime. But there no reason why this should be so. No good reason to have a hard boundary between compiletime and runtime either. These are just historical artifacts.
So how would you solve the AOT (ahead of time compiling) problem without code generation? An entire ecosystem (Unity) that uses C# requires that code must be AOT for supporting IL2CPP (a low level translation of IL to c++). Dynamics and Reflection of non-AOT types are unavailable at runtime. IL2CPP came from Apples requirement that no JIT be run in apps and to get more performance; especially, for features like burst that allows writing C# that directly translates to high performance multithreaded c++.
Different usage, I think: if people are talking about "language not expressive enough", they're referring to mechanisms for generating C#, or IL, not things further down the toolchain for AOT.
System.Xml.Serialization, for example, relies on generating assemblies at runtime to work. That's "code generation", but of a kind that directly conflicts with the AOT meaning of "code generation".
You can't make a language fully general without it turning into a mess; things like the protobuf compiler are reasonable use cases for source generation.
My employer has more than that, and is not subject to it. I don't know exactly why, but I think has something to do with availability to public? Our users are employees of our customers.
SAP ERP is nowadays mostly written in C(++), java and ABAP (their own programming language to implement business logic, forms and reports) with SAP HANA bringing Web technologies.
SAP also predates the cloud, it used to be in mainframe land though (SAP R/2).
It has a cloud offering in its latest revision SAP HANA, but switching a major version is prohibitely expensive and requires immense amounts of work.
It would depend on your definition of porn of course, but at least in Germany you can get pornographic magazines at lots of kiosks/stores, especially the bigger ones
So as it's intended for being used inside the compilation process, i don't think this is too valid of a concern.