Hacker News new | past | comments | ask | show | jobs | submit login

What kind of behavior relies on reflection in C#? Is this widespread or isolatable? Is it necessary to use strings to look up symbols in C# or can you distinguish between strings and identifiers?

> We're talking about saving how much disk space anyway?

Surely this is relevant to how the customer values disk space, not the developer.




> What kind of behavior relies on reflection in C#?

Tons. Serialization, for one, And plugin systems are commonplace.

> You have zero grounds to dictate the value of resources.

Nonsense and worse words. We know how much disk costs. It is a rounding error for the overwhelming majority of people and the overwhelming majority of apps. Prioritize what matters.


>We know how much disk costs. It is a rounding error for the overwhelming majority of people and the overwhelming majority of apps.

We know how much disk costs, but at any given moment a certain non-negligible share of businesses will be working with very old equipment in some of their branch offices, self-service terminals, factory floors, labs, etc.

I agree that 17 MB will rarely be a show stopper in isolation. But resource consumption is critical if Microsoft wants .NET to be a universal solution for business computing needs. Memory is far more likely to be the bottleneck in my experience.

If a company has modern equipment in 95% of their locations, but the remaining 5% are difficult to upgrade for some reason (cost of disk is unlikely to be that reason), then those 5% will determine which technologies are even taken into consideration.


Download size and speed matters. Disk space matters especially if you're working with relatively expensive SSDs. Of course, how much of a problem this is depends on which country you're working in, company's laptop policy etc


Because size is rounding error for your high-end hardware, I don't have any space left to install your app.


Isn't asp.net mvc also using relying massively on reflection?


> Serialization, for one

Surely this is doable statically. What is the advantage of doing this at runtime rather than at compile time?

> Nonsense and worse words. We know how much disk costs. It is a rounding error for the overwhelming majority of people and the overwhelming majority of apps. Prioritize what matters.

Got a citation? Disk space is the only variable that people even know to complain about... Not sure what you're drawing this from but it stinks to high heaven of corporate propaganda.


>Got a citation? Disk space is the only variable that people even know to complain about... Not sure what you're drawing this from but it stinks to high heaven of corporate propaganda.

I'm not sure where "Disk space is the only variable that people even know to complain about" did come from, but games use 100-150 GBs nowadays, so things like 17 MB are basically irrelevant unless you do verrrrrrrrry specific stuff


Not everyone, let's say me, plays games. I find it insane that I am installing software packages that take up 10s of mbs or multiple gigs in some cases. It's just plain lazy in most cases that I saw. Maybe for games it's different, but I have a 256gb ssd in my macbook and it's complaining all the time it's full, without games; I don't find anything like this irrelevant. There is almost never a need for huge packages (maybe outside games, I don't know about that, again).


> I'm not sure where "Disk space is the only variable that people even know to complain about" did come from, but games use 100-150 GBs nowadays, so things like 17 MB are basically irrelevant unless you do verrrrrrrrry specific stuff

If you have a phone with 8G of space like I do, obviously games which require 150G are beyond my means. How does this work towards disk space being irrelevant?


I'm puzzled as to what a phone has to do with .NET in this particular discussion. It's not at all about phones.


Huh? I complain about RAM usage and garbage collection CPU time in my Electron apps just plenty. And those apps are huge too. I've never once needed to uninstall an application because I needed to reclaim the disk space. Just games and media files.

If you're talking about the server side....well I think you'd save a lot more on less vCPU than a little more attached storage.

So let me put it back on you: except maybe IoT, where do you run into problems where your app takes up too much disk space?

EDIT: Maybe it's an update/bandwidth thing? Or a Docker pull time in CI? I'm trying to play devil's advocate here...


> I complain about RAM usage and garbage collection CPU time in my Electron apps just plenty.

What does this have to do with C#? Surely you hold it to a higher standard than electron of all things—C# has been around for 18 years. Electron is just repackaging a browser as an app. Is this the standard to which microsoft holds themselves? Might as well sell scripts for google docs....


Widespread.

Asp.net, entity framework, anytime you use an attribute, binding, autogenerating columns based on an object.


Right. It's not that "normal" C# code uses a lot of reflection, but it's useful in a lot of small places. So the chances of any given program requiring at least some is pretty high.


Yeah, I very rarely write reflection code (and 90% of the time its attribute related) but I can't remember the last time I worked on a non toy project that didn't leverage reflection somewhere.




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

Search: