6 ms·
Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#. It's a great language regardless.
by the_duke 6y ago
Crystal has a GC. I see it as more similar to the likes of Nim, Swift, Java or C#.
It's a great language regardless.
- tomc1985 6y agoAh! I hadn't thought of those, though I think because 3 out of 4 are tied to a specific platform
- coder543 6y agoI think you mean 1 out of 4? Swift is the only one on that list that really feels tied to any particular platform. C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. Java has always had a strong focus on portability, of course. Nim... I don't know much about. Doesn't it compile to C? I don't think it intentionally has any particular platform affinity, although I wouldn't be surprised if it worked best on Linux.
- tomc1985 6y agoC# is tied to .net, and the cross-platform story on that framework is...complicated Java is tied to JVM Swift is tied to MacOS. Of course, with the exception of JVM, they are all nominally "cross-platform" in the OS sense of the word. But I haven't seen any substantial Linux/Mac .Net codebases yet, same with Swift on Windows
- travv0 6y agoThe cross-platform story of .NET hasn't been complicated in a while. It's fully cross-platform between Windows, Linux, and macOS and has been for a few years. Edit: I just saw the person that you replied to said the same thing, so I'm not sure why you're pushing that it has a complicated cross-platform story.
- tomc1985 6y agoSo... pretty much everything I could do on .net framework runs on Linux and Mac now? Even Winforms, or WPF? To be fair I haven't written .net code in like 10 years, and the docs explaining how to navigate the transition from framework to core were extremely confusing. Has that soup of different technologies solidified any?
- nullsense 6y agoThe docs can be summed up as: TL;DR rewrite it - there is no migration path!
- travv0 6y ago> So... pretty much everything I could do on .net framework runs on Linux and Mac now? No, which doesn't really matter since we're talking about .NET, not .NET Framework. Poor naming choice by Microsoft I guess.
- deleted 6y ago[deleted]
- rafaelvasco 6y agoC# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.
- nonbirithm 6y agoC# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS Code wasn't much different, given I couldn't seem how to get OmniSharp working for my project. Eventually I found the only thing that worked half the time was Rider, which actually allows you to manage NuGet packages but costs $139. And still, I often had to load and unload projects or even create new projects entirely just to get it to find the new assemblies I added. It left a bad taste, but maybe that was because I wasn't using a distro like Ubuntu.
- Const-me 6y agoMatches my experience. Linux runtime worked great for me, SDK has not. To use it to full extent, I think you have to develop on a Windows PC with Visual Studio. However this way you can only debug on Windows i.e. if you want debugger, the project has to be runnable on Windows too.
- oblio 6y agoUse Rider.
- metaltyphoon 6y agoWhat a weird case. I have successfully used dotnet core on these distros (alpine, centos, fedora, debian, ubuntu) without a single problem. If you don't mind, what distro are you using ?
- socialdemocrat 6y agoSwift is not any more tied to macOS than C# is tied to Windows. Compiler LLVM and everything is open source and cross platform. Not all the libraries but that holds true for C# as well, last time I checked.
- metaltyphoon 6y agoC# (CLR specifically) is not tied to windows and hasn't been for a while now. Perhaps the last time you checked was pre 2016 ?
- dixego 6y agoNim does/can indeed compile to C.
- heavyset_go 6y ago> C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. My experience with C# and .NET Core on ARM Linux is that it comes with a lot of crashes and segfaults. On x86-64 Linux it works well, though.
- Const-me 6y agoIn my case the ARMs were Raspberry Pi3, Pi4, and RK3288. Linux was Debian in all cases, and .NET was 2.1 and 2.2. Worked great for my use cases, only crashed when I screwed up with unsafe or unmanaged code. If your environment is anywhere similar, and you OK with .NET 2.1.18, you can try my package: https://github.com/Const-me/Vrmac/releases/tag/1.0 https://github.com/Const-me/Vrmac/releases/tag/1.0 Sources: https://github.com/Const-me/Vrmac/tree/master/net-core https://github.com/Const-me/Vrmac/tree/master/net-core
- pjmlp 6y agoMy experience porting C++ stuff into Java/.NET, with occasional native libs, most of the time using a GC based language is more than enough for the expected system performance. Naturally it requires understanding the whole stack, how to improve performance in general, picking the right data structures and algorithms as well. Of course, there are scenarios where that might not be enough, and that is where a C or C++ native library might come into play. No need to be siloed into a single language.
- socialdemocrat 6y agoDoes languages don’t belong together. Java and C# sure. They use sophisticated garbage collectors and target intermediate code. Nim, Crystal and Swift all compile to native code and is designed for that. Swift is not a GC language in the normal sense since it uses automatic reference counting. That is fully deterministic and with low latency. There is no stop the world to collect garbage like with Java and C#. Swift is akin to C++ code with smart pointers.
- bitmapbrother 6y agoIsn't reference counting a form of garbage collection, though? If you want performance then Objective C and Swift aren't the languages you should be using. There's a reason why Apple recommends C/C++ if you need your code to run as fast as possible and also the reason why the high majority of professional games are written in C++ with either a thin Objective C / Swift wrapper. Also, you can compile both Java and Kotlin to native images with Graal. https://www.graalvm.org/examples/java-kotlin-aot/ https://www.graalvm.org/examples/java-kotlin-aot/
- the_duke 6y agoYou can group languages in different ways. VM vs native is one way, but you can also go by the level of abstraction they provide, which very much puts them in the same category. Also, this debate comes up every time, but ARC is widely classified as a form of garbage collection, just not a tracing one. It is transparent and automatic to the user. (Well, apart from cycles)
- viktorcode 6y agoI disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the other hand have period of time where the references are intact but marked as garbage. FWIW Chris Lattner, the language creator, put Swift into a non-GC camp.
- pjmlp 6y agoBecause he needs to sell it, and Apple developers got a bad taste of Objective-C GC implementation that never worked out properly. Widely acknowledged CS books see it differently, https://gchandbook.org/ https://gchandbook.org/
- ksec 6y agoLilith: x86-64 OS written in Crystal https://github.com/ffwff/lilith https://github.com/ffwff/lilith