netzgestaltung
Ich weiß jetzt nicht was das mit Typen zutun hat... Das ist ein komplett anderes Konzept. Das Problem warum JavaScript ohne Typen so hart ist ist: DU hast kein IntelliSense. IntelliSense ist das so ziemlich praktischste Tool überhaupt, ich hab Programmieren gelernt nur durch dieses Feature.
Wenn du keine Typen hast dann sind ReferenceExceptions quasi minütlich. In einem Team ohne Typen zu arbeiten, da brauchst du entweder verdammt gute Leute, verdammt gute Tester oder du kannst das Projekt gleich einstellen weil es dir um die Ohren fliegen wird. Und wir haben weder das eine noch das andere.
Wie soll man denn bitte damit umgehen? Soll man eifnach vor jedem Property-Zugriff eine Abfrage machen ob die Property existiiert? das würde den ganzen Code verdreifachen ohne irgendeinen Mehrwert. Das ist einfach kein Zeitgemäßes Programmieren, du brauchst Typen.
Das Prototyping ist eine nette Referenz, zweifelsohne, und vielleicht kann man damit auch interessante Dinge machen, ansehen werd ich es mir auf jeden Fall, aber mit Typen hat das kaum bis gar nichts zutun.
Ergänzung ()
benneq schrieb:
Babel ist einer dieser ganzen Compiler. Decorators sind zwar Teil des ECMAScript Standards (bzw. noch in Stage 3), aber werden aktuell in keinem Browser unterstützt. Und wie bekommt man das dann zum laufen? Babel nimmt deine Decorators aus dem Source Code und macht daraus JS Code, der sich identisch verhält, aber ohne Decorators arbeitet.
Ja ich weiß und das ist quasi dasselbe KOnzept von TypeScript was mich auch schon wieder wahnsinnig macht, dieses ganze transcodieren. Dann baut das zeug doch in JavaScript ein! Ich meine es gibt doch auch keine NuGet Pakete die dir deinen C# Code in neuen C# Code umwandeln nur um neue Syntax zu unterstützen, weil alles was du brauchst schon in der Basis vorhanden ist.
Darum sollen sie halt einfach TypeScript unterstsützen, nativ, und das gesamte Problem ist behoben. für immer! Ich kapier echt nicht wie das passieren konnte...
benneq schrieb:
See AlsoReusing Basic Setup Code in Docker: A Time-Saving ApproachUnterstützen nur Creative Karten EAX oder auch normale onboard karten?How to Install Unity Desktop on Ubuntu 24.04, 22.04, or 20.04 - LinuxCapableNews - Auch für Radeon: Crytek zeigt Raytracing-Demo für kommende CryEngineWieso Pech? Man kann lit-html mit und ohne TypeScript benutzen
wenn überhaupt dann nur mit build Vorgang. Und das wollen wir ja eben nicht, da wurde ich massiv angefeindet >.< Ich meine wenn du sagst du hast die neuste Version von lit als reines JavaScript package, dass du mit einem import-statement importieren kannst und dann klassen wie LitElement und Funktionen wie html` und css
` benutzen kannst, dann bitte, das ist nicht sarkastisch, wir suchen händeringend danach. unsere Version ist schon seit 2-3 Jahren veraltet.
benneq schrieb:
Weil sich die Browser an einen Standard halten: ECMAScript. Sonst wird das wieder wie früher, wo jeder Browser mit seine eigenen Scriptsprachen mitbrachte.
Aber TypeScript ist doch ein Standard. Laut einer Statistik die mir GPT-kun gerade ausgegraben hat bevorzugen 75% aller entwickler bereits TypeScript, das ist keine Frage von Randfällen mehr. Und das ist von 2021. Aber gut brignt ja auch nix darüber zu diskutieren, die Chance ist eh vorbei und es ist wie es ist, aber ich krieg TypeScript nicht durchgeboxt weil es eben nur irgendeine pseudo-offizielle API ist die irgendwelchen Code umschreibt der dann im Browser kompiliert wird. Ich selbst würds ja benutzen aber wir haben halt diese Stenkerer mit drin, die sich mit diesem ganzen transkodieren zeug und dem Build Vorgang und dem Garbage-Code der da am Ende rauskommt nicht anfreunden können.
Und ich muss dazu sagen, es ist schon verdammt praktisch wenn man z.b. bei nem Tester einfach die Browser-Konsole aufmachen kann und dort im Skript-Tab debugge kann, um zu sehen wo der Fehler liegt, ohne das wären wir wohl noch weiter zurück mit unserer Arbeit als wir eh schon sind. Da kannst du halt nicht sagen "installier mal schnell VSCode"
Ergänzung ()
benneq schrieb:
dass es "irgendein HTMLElement" ist.
eben nicht. Was wir kriegen ist irgendein krankhafter ElementNode, der so gut wie keine Properties hat. Den muss man erstmal nach HTMLElement casten. Es gibt dutzende solcher Beispiele bei der JavaScript api. Unser Code ist aktuell zugepflaster mit /** @type {...} */ kommentaren
Ergänzung ()
benneq schrieb:
So viele Nachteile in TypeScript, und trotzdem willst du es als offizielle Sprache in allen Browsern haben? Dann doch lieber gleich was, das nicht auf den unzähligen Designfehlern von JS aufbaut.
Alle Nachteile von TypeScript können mit nativemBrowser-Support behoben werden. Browser-Support heißt kein Build Vorgang mehr. Das transcodieren fällt dann auch weg wenn sies so unterstützen wie's jetzt ist. Und dann ist auch die unterliegende ECMA version egal weils dann nichts unterliegendes mehr gibt. Aber hey, mir isses wurst wenn es die Option gibt C# an Browsern zu unterstützen dann würde ich nackt vor Freude Rad schlagen 🤣
Ergänzung ()
benneq schrieb:
Mir klingt es so langsam danach, als ob du alles was du zwischen die Finger bekommst versuchst wie VanillaJS zu benutzen.
Nein eben nicht, wenn ich Blazor benutze will ich GAR keine JS Interops. Ich will nur C# benutzen wenn ich mit diesem Framework arbeite. Aber wenn natürlich nur so halb bis gar keine Brwoser-Funktionalität im C# code unterstützt wird, dann hast du am Ende nur eins erreichst, dass du 4 Programmiersprachen statt 3 verwendest, C#, JS, HTML und CSS. Ich seh da keinen gewinn.
Aber wenn du mir jetzt z.B. sagst dass JS INterops nur die absoluten Randfälle sind und man problemlos eine komplexe Webanwendung ganz ohne JS Interops errichten kann, dann hab ich das einfach nur falsch verstanden und ehrlich gesagt bete ich zu Gott nach so einer erfolgsmeldung^^ und das als Atheist.
Ergänzung ()
benneq schrieb:
Ist doch auch voll legitim, wenn du mit dem Tool sauber und effizient arbeiten kannst
Ja wenn... Unity ist eine 3D Engine, keine Ahnung ob da was performantes bei rauskommt wenn wir sowas zur UI-Entwicklung verwenden, soweit ich weiß hat das noch nie einer gemacht ^^
Zuletzt bearbeitet: