4 ms·
I totally get using Swift in this context considering their heavy emphasis on C++. From my personal experience, Swift still feels like the early days of Open so
by Decabytes 2y ago
I totally get using Swift in this context considering their heavy emphasis on C++. From my personal experience, Swift still feels like the early days of Open source .NET/Mono. You will definitely experience the growing pains of being an early adopter of the language. The fact that JetBrains killed AppCode in Dec of 2022 7 years after Swift went Open Source is telling to me that getting the traction outside of the Apple ecosystem is not there. The vast majority of the people I see developing open source Swift apps still use Xcode and a Mac. For example Miguel De Icaza is a huge proponent of open source Swift, and is doing a lot of cool things with Swift Godot. But he develops on a Mac just like everyone else. The experience with VScode is just okay.
I think that the cross platform story both in terms of developer libraries, experience, and tooling is still much better on .NET, and provides a happy middle ground between something like Swift and Java. With that beings said I hate the options for Mobile/GUI with .NET (MAUI, or AvaloniaUI), and would recommend Java/Kotlin if you want to do that. I want to give a special shout out to F# as I feel like it is the most sensible functional programming language I've ever used, and is a lot less verbose then C#. The only knock against it I have is that it's a smaller community than C# and most of the libraries you use will be written in C# so you need to know a little C# as well to be effective
- pjmlp 2y agoC# has a uphill battle against those that don't believe in systems programming languages with GC, despite several graphical workstations have been done in the past in such languages. Unfortunately freebie UNIX, and security was yet decades away to be relevant to governmental regulators, thus they never managed to gain enough mindshare to keep going. Additionally even with all the .NET team efforts, the technology remains mostly relevant to Microsoft shops. I seldom see RFPs from UNIX first culture companies, that quote .NET as possible delivery technology.
- layer8 2y agoGC still has the downside of higher memory overhead. While I’m not particularly a fan of Swift, this is a relevant argument for a general-purpose browser implementation.
- pjmlp 2y agoReference counting is also a GC algorithm, even though people pretend otherwise, as they seldom learn from CS literature. Plus all systems languages with GC, including C#, can do C and C++ style memory management.
- layer8 2y agoThis is an old argument, and it’s well understood that “GC” by default refers to tracing GC and delayed collection. (Without delayed collection, there arguably isn’t any “garbage” in the first place.) “Can do C++ style memory management” is very different from what happens when coding in the default idiomatic style of the language and when using existing libraries written in the language. What happens by default is a relevant consideration.
- pjmlp 2y agoUnderstood as such by those that don't grok CS. What is relevant is if one is actually skilled in using their tools, or should be doing something else instead.
- zarzavat 2y agoA definition can’t be right or wrong, it can only be popular or unpopular. The definition of GC encompassing RC has fallen out of favour because it doesn’t capture the essential distinctions that people want to make: firstly, are cycles broken automatically? secondly, is there any tracing process happening behind the scenes? Most people are happy to accept that CPython is GC because it does RC and cycle collection so you are managing memory thinking about paths from a root, but not Swift because you are managing memory thinking about an ownership graph. In the past, people wanted to make a different distinction: is the CPU having to do extra work to keep track of a reference count. When CPUs were slow, this was an important distinction to make. Nowadays it’s a less important distinction so the definition has evolved.
- 2y ago
- neonsunset 2y agoLuckily, for the project of this type, you can use SkiaSharp (which is awesome) or simply implement a rendering back-end that targets OpenGL/Vulkan/DX/Metal. There are rich binding libraries with low/zero overhead to do so like TerraFX or Silk.NET or you can just do it directly. For example, Avalonia implemented Vulkan back-end some time ago, no C or C++ required: https://github.com/AvaloniaUI/Avalonia/pull/12737 https://github.com/AvaloniaUI/Avalonia/pull/12737 Even then, you are absolutely not married to any of these GUI frameworks, but if are targeting desktop, then Avalonia offers great user experience.