5 ms·
So like Blazor for C#?
by zerr 3y ago
So like Blazor for C#?
- kaba0 3y agoIt runs as quite lean JS on the frontend. If I’m not mistaken, Blazor targets WASM with huge binaries that may prevent its use in certain cases.
- pjmlp 3y agoNot really specially after .NET 8, Blazor will be unifying all ASP.NET programming models, whereas in Clojure it is more simple. Also ClojureScript doesn't do WebAssembly.
- capableweb 3y ago> Also ClojureScript doesn't do WebAssembly. It's a bit ambiguous what you mean with "do", but you can definitely use WebAssembly modules in ClojureScript just like you can in JavaScript. I'm not familiar with Blazor or C# so maybe I'm missing something obvious here.
- pjmlp 3y agoThe obvious part is compiling Clojure source code into WebAssembly bytecodes.
- capableweb 3y agoAh, yeah, that's probably a bit far off in the future. Probably would be possible via GraalVM once GC is available, https://github.com/oracle/graal/issues/3391 https://github.com/oracle/graal/issues/3391
- dustingetz 3y agoplease state the value prop of doing that?
- pjmlp 3y agoThat wasn't the question, rather comparing ClojureScript vs Blazor from OP.
- jwr 3y agoI don't know Blazor, and it's difficult to tell from the webpage. But I can tell you that most of my model (business logic) code is written in Clojure and compiles to both JVM and ClojureScript. In other words, I use the same code on the server and on the client. I also use EDN (meaning Clojure) as the serialization format between them, so I avoid serializing to something non-native. All this buys a lot of incremental improvement. ClojureScript gets compiled using Google Closure compiler in "advanced" compilation mode — for those who might not know, this is not a "minifier", it's a whole-program transformer which does renaming and dead code elimination. The result is highly optimized JavaScript. I guess that's why there isn't much excitement about WebAssembly in Clojure circles — the current state of affairs is really good enough. In my experience (complex SaaS app), DOM operations are a performance bottleneck, not ClojureScript.