KitKat::new()
Vice Admiral Pro
- Registriert
- Okt. 2020
- Beiträge
- 6.209
Hab ich, und zwar nicht nur die populärstenBeBur schrieb:Dann lies mal auch die kommentare dazu.
Ich denke, dass sich das nicht ausschließen muss und ohne Maintenance Einbußen auch viel an Performance rausholen kann.BeBur schrieb:Bitte nicht Performance-Aware entwickeln, sondern Maintenance-Aware.
Sehe ich auch anders. Merkt man z.B. ältere oder günstigere Smartphones/Laptops/Tablets nutzt. Achja, Browser würde ich zu den komplexen Zwischenlayer dazuzählen.BeBur schrieb:Es gibt im Allgemeinen nur ein Performance Problem, wenn man komplexe Zwischenlayer einsetzt (z.B. Electron oder React Native)
Aber da kommt es wieder drauf an:
KitKat::new() schrieb:irrelevant für den Entwickler, aber am Ende kaufen Leute doch neue HW, weil Software zu träge wird oder der Arbeitsspeicher ausgeht
Ergänzung ()
Und switch case opfert inwiefern Wartbarkeit, wie z.B. Erweiterbarkeit?Piktogramm schrieb:An solchen Stellen sollte man Warbarkeit und Erweiterbarkeit bzw. die Prinzipien von "Clean Code" nicht ohne (akute) Not einer Performanceoptimierung opfern.
Man könnte sogar dahingegen argumentieren, dass sich diese erhöht, weil ein spezifischer Teil der Businesslogik gesammelt wird statt über mehrere Klassen verstreut wird:
https://news.ycombinator.com/item?id=34980045I prefer to have those 104 cases all in one place (as is the case, when it is a switch statement) rather than each in a separate file, that I need to jump around between now (as is the case with polymorphism). This situation is a bit analogous to organising things column-wise vs row-wise. And in practice I find that I need to jump around a lot less with code that uses switches than with code that uses polymorphism. Tangentially, the latter is also more prone to turning into spaghetti, as the whole is obscured by indirection levels between the parts, but you don't see the spaghetti until you try to step through the code, when debugging an issue or just trying to familiarise yourself with a new codebase.
In der Pauschalität würde ich definitiv nicht mitgehen.
Zuletzt bearbeitet: