5 ms·
WASM, Android, and iOS targeting is subpar, though. For multi-platform client-side targeting, Kotlin is actually more interesting. .NET was always built for sh
by bad_user 3y ago
WASM, Android, and iOS targeting is subpar, though. For multi-platform client-side targeting, Kotlin is actually more interesting.
.NET was always built for showmanship, with somewhat disappointing results when actually tried.
- jayd16 3y agoWhat makes kotlin more interesting besides the first class Android support?
- bad_user 3y agoThe latest Kotlin can target WasmGC. WasmGC became enabled by default, quite recently, in both Chrome and Firefox: https://developer.chrome.com/blog/wasmgc/ https://developer.chrome.com/blog/wasmgc/ Kotlin's support is in Alpha right now, but works well, and it's one of the first language implementations that can target WasmGC: https://blog.jetbrains.com/kotlin/2023/12/kotlin-for-webassembly-goes-alpha/ https://blog.jetbrains.com/kotlin/2023/12/kotlin-for-webasse... By comparison, .NET's Blazor targets LLVM, and they either AOT or JIT, however the client has to download a heavier runtime that has at least a garbage collector (nevermind the JIT), and is less than ideal. Basically, the original Wasm was designed for languages with linear memory and still makes a great target for C++ or Rust, but not for managed languages like Kotlin/Java. dotNET's WASM is there only to support Blazor, which is a web framework, a sort of successor to Web Forms and whose future is uncertain. Speaking of which, you're better off with MVC + HTMX, but I digress. So for more interesting use cases, Kotlin is actually ahead in their Wasm support. For multi-platform support, the company behind it has a vested interest in targeting multiple platforms, and Kotlin Multi-platform support also has Google backing. So, for one, you can share business logic on iOS, as you can integrate Kotlin libraries into Swift applications: https://kotlinlang.org/docs/multiplatform.html https://kotlinlang.org/docs/multiplatform.html And they have been porting Jetpack Compose to the desktop and to iOS (and can be used with Wasm in the browser, too): https://github.com/JetBrains/compose-multiplatform https://github.com/JetBrains/compose-multiplatform Also, see this year's keynote at KotlinConf: https://www.youtube.com/watch?v=c4f4SCEYA5Q&t=2903s https://www.youtube.com/watch?v=c4f4SCEYA5Q&t=2903s Over on dotNET side, the blessed solution by Microsoft, for targeting iOS, Android, or the desktop, is right now .NET MAUI. So, where's Xamarin? Where's Silverlight for that matter? That's right, Microsoft changes multi-platform solutions like they change socks, and I don't understand how anyone could trust them for a multi-platform solution.
- neonsunset 3y agoWasmGC is a prototype that only supports the bare minimum that is enough for languages with high level constructs only but not for something like C# which has interior object pointers (ref) and uses them heavily for performance (spans are built on top of them). The API of WasmGC is really rudimentary. With that said, you can track support of various WASM features by .NET here: https://github.com/dotnet/runtime/issues/94351 https://github.com/dotnet/runtime/issues/94351 I don’t understand how the logic of your post works however, WASM in .NET is already used in production versus something that is an early alpha? Also, on Kotlin and targeting something that is not Android - “Java Interop” that’s all I need to say.
- wiseowise 3y agoWhat’s wrong with Java interop?
- mihular 3y agoMAUI is rebranded Forms and while MS is pushing it, it's by far the only way to build an Android UI. You can build it natively, sort of like since the beginning. While still supported, Xamarin transitioned quite nicely into .NET where can take all of the advantages. And you get a good reply about WasmGC in the other post. Also .NET is ahead when it comes to cross platform UI compared to Kotlin - there are libraries such as Avalonia, Uno and others. And so on and so forth.
- naavis 3y agoHow have I missed Uno! I was familiar with Avalonia, but first time hearing about Uno. I'd love to see more UI frameworks for .NET that also work on Linux.
- WillPostForFood 3y agoit's by far the only way to build an Android UI far from the only way! (as you explain).
- 3y ago
- superfist 3y agoYou have either outdated info or outdated experience
- gregmac 3y ago> WASM, Android, and iOS targeting is subpar How so?
- tuwtuwtuwtuw 3y ago> showmanship What do you mean by that? I know what the term means but considering it's one of the most used programming stacks I don't understand what you mean when you use it.
- babypuncher 3y agoI don't know what they're talking about. I've always viewed .NET, C# in particular, as not being very flashy and more targeted towards "getting stuff done". It does not shine particularly bright in any one specific area, but it is competent enough in most use cases to be a very safe choice for a wide array of applications.
- drzaiusx11 3y agoOnly thing flash-y related to C# was Silverlight but that's long since dead.
- subtra3t 3y agoI would think C# is meant to be a general purpose language based on that. Python too is a general purpose language but community libraries (which I think the support for C extensions helped with) enabled amazing things like scipy. Similarly I think C# excels at game development because of the many engines it is used. Maybe it began because of XNA but then got popularised because of Unity but I do not think it is due to any special features in C# itself that are not found in other languages. I am not sure about this so please correct me if I am wrong.
- neonsunset 3y agoHmm, out of all languages with GC, C# offers lowest level constructs (pointers, tracked references (refs), pure C structs and low/zero-overhead interop)*, which something all other options either don't offer at all, or offer partially or with higher overhead and worse UX. All of these are very useful for interoperating with graphics APIs directly and managing memory manually for performance sensitive code paths. I don't think these were the reason behind C#'s rise in gamedev historically, but they do ensure it continues to be its mainstay. *today you can also add powerful SIMD and BLAS-adjacent abstractions to this list, a good showcase of which would be Bepuphysics2 which is a heavily vectorized physics engine written in pure C# that is as fast as PhysX and faster than Jolt (another SIMD-using physics library written in C++) https://github.com/bepu/bepuphysics2 https://github.com/bepu/bepuphysics2