Modern .NET is reducing dependence on reflection. System.Text.JSON and other core libraries have leveraged source generation to produce AOT + trim friendly, reflection free code. But yeah, it's not a taboo like say dynamic
, it's perfectly normal to use reflection in idiomatic C# code.
kogasa
I don't get what you mean. You can define class Pie
and instantiate it with the type argument Pie
.
Huh, maybe I don't get it because Lemmy is literally erasing angle brackets from our messages. Not just "not rendering." It's removing them entirely. There should be four angle brackets in the first line of this comment...
True, but that's definitely C#
This is just so people can't self host media, right? Why else would they obsessively cap upload speeds?
You're gonna have to settle for VB free
Oh yeah, you shouldn't. But people do this for fingerprinting, bot detection, and other "adversarial" scenarios where you really don't like the person executing your code. It's somewhat plausible Google would use this technique to do something scummy like this (although that is not the case).
Relevant article and a great read: https://www.nullpt.rs/reverse-engineering-tiktok-vm-1
The assignment syntax is too close to comparison, which is what is more typical in that position. I would recommend
const bool _isFeatureEnabled = false;
if (_isFeatureEnabled && ...)
if not a proper feature flag (or just remove the code).
Automata and formal languages were pretty much my entire "Theory of Computation" class. It's what's in Sipser.
You can build a virtual machine in JavaScript and execute compiled code on it
That's why I stopped writing code and started writing ASTs and AST transformers that can be configured to emit libraries.