by d--b · 9y ago · 0 comments
It is cheaper to develop a .Net app than a C app. Cheaper in Development and maintenance.
It is cheaper to not care about efficient data management, or indexed data structure.
What we're losing in efficiency, we gain in code readability, maintainability, safety, time to market, etc.
I think this is true but I disagree that it's inherently true. Slapping a UI together with c and GTK is pretty strait forward for instance, here is a todo list where I did just that (https://gitlab.com/flukus/gtk-todo/blob/master/main.c). It's not a big example, but building the UI and wiring the events was only 40 lines of code, it's the most straightforward way I've every built a UI. More complicated things like displaying data from a database are harder, but I think this comes down to the libraries/tooling, the .net community has invested much more time in improving these things than the c community.
> What we're losing in efficiency, we gain in code readability, maintainability, safety, time to market, etc.
I don't think we've exhausted our options to have both. We can build things like DSL's that transform data definitions into fast and safe c code for instance. Imagine instead of something like dapper/EF doing runtime reflection we could build equivalent tools that are just as easy to use but do the work at compile time. Or we could do it via rusts kickass compile time meta programming.
https://www.devexpress.com/Products/NET/Controls/WPF/
Also are you sure your C app will have a high score on clang and gcc sanitizers?
However, if you pick .NET vs Delphi you will see is easier to develop UI apps (and general apps) in Delphi than .NET.
Even today.
The exception is web apps, and web apps is another big problem that "normalize" bad architecture, bad language and bad ways to solve everything.
If wanna take a look for your self you can install Lazarus (http://www.lazarus-ide.org/, discussed https://news.ycombinator.com/item?id=14973706) a close clone of Delphi (version 7).
Or download the free edition (modern):
https://www.embarcadero.com/products/delphi/starter/promotio...
The language itself is still quite ok.
But I'd definitely be interested in any studies that have tried to measure these over long time periods.
In fact I think there is a sort of casual indifference to the first two that frequently borders on criminal neglect. Why bother with them when the "time to market" driver of methodology selects for the most easily replacable code?
Safety is also debatable and mostly accidental. Most of the languages that are fast and "easy" to develop in rest on a core of C or C++, and are really only as safe as that code. Safer, because there may be fewer foot guns, but not necessarily "safe."