Swift is not even in the default repositories of most distributions, for instance.
Swift is not even in the default repositories of most distributions, for instance.
As someone working on porting “everything” to a decidedly not weird architecture and a very well known operating system, I chuckle a bit because neither language works right now. Not even their dependencies work. It’ll be a while before they will be supported.
(Swift works perfectly, but it would be unfair to compare it because it had a strong investment made in it to work…)
Can you say which ones? It's hard to place your comment without details.
These are the benchmarks for different ARM platforms[2], where I had submitted one for Jetson Nano a year back and now it seems there's one for Apple Silicon.
I'm not telling, no one would ever find cross platform issues with Go; I'm just curious to know what issues you have faced and whether it's because of Apple's extension of ARM instructions.
Apple’s proprietary extensions don’t really affect porting efforts except in one specific case when writing high-performance JITs for language runtimes. (And there is a fairly simple patch to disable this entirely.)
I'm not sure what's preventing you from giving a direct & specific answer. As it would be useful to know where Rust/Go's toolchains fail for using the code for cross - platform applications.
Go team was already working on getting the toolchain to work on darwin/macOS before Apple announcement[1] because GOOS=darwin meant iOS(gomobile) and there are instructions available now[2] to build it successfully before the official patches. Your test results there would be a valuable contribution.
>Some warnings that will probably be problematic at the future related to the ABI defining char to be signed
You mean unsigned char? that's a common hurdle while porting x86 code to ARM.
[1]https://github.com/golang/go/issues/38485
[2]https://gist.github.com/tonistiigi/290d2e7118fe6f581e336bf35...
For instance, GCC is not ready and no one really knows when it will support desktop Darwin on AArch64 (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168#c6)
Many so-called "cross platform" projects have had big surprises when it actually came time them to be ported to other platforms.
It's extremely rare for a project which has never been compiled and launched on another platform to actually require 0 porting effort for that platform once actually required to run there.
And regarding your porting, Perl, sure, was easy to port. What about CPAN? Want to bet how many Perl libraries will keel over? Same thing for Ruby/gems, Python/pip, etc.
Don't get me wrong, your work is nice, but the people that build on top of your work outnumber you by 2-3-5 orders of magnitude and not all of their porting efforts will be trivial.
Edit: I've checked, none. Most of the Python stuff out there will use at least some.
Swift is a very nice language, but one is better served with it if their main market is Apple platforms.
Just like .NET Core, regardless of how much commitment Microsoft is putting into it, remains a subset of the .NET community at large, the so called dark matter developers.
Apple is interested in running Swift on OSX and iOS. Goolge is interested in running Swift on Linux servers to do to Machine Learning.
Windows support has to come from whomever is interested in it. Neither Apple nor Google have a big interest in that.
Same with other stuff. I, for example, am interested in using Swift with GTK+. I don't expect Apple or Google to work on that.
Yet they had enough C++, Android, Python and JavaScript to talk about.
C++, Python, Julia, R own Machine Learning.
I don't miss Swift on Windows, the JVM and .NET stacks offer plenty of choice, including better GPGPU support across multiple OSes.
Yes, but the reality of Open Source is that unless money are paid, it often goes nowhere for big projects (that need lots of work to port/create libs/etc).
The interested party is the one who pays for the development of the feature they want, mostly by paying a developer to do it.
You wrote:
"The nature of Open Source means that any interested party contributes to the project the features it is interested in"
And my comment essentially means:
Yeah, BUT this "nature of Open Source" is just a mere potentiality.
The fact that FOSS allows "any interested party can contribute" means nothing if there's no interested party with deep pockets (or time/skill to contribute).
I was trying to make the point that Swift will be good for the things that the parties who are interested in it need it for. And these interested parties are the deep pockets you are talking about.
We might just be saying the same thing :)
I'm not saying it's the current status quo, but if the server-side Swift community reaches a critical mass where it's easy to get support, and there are plenty of libraries available, it doesn't matter one bit if the iPhone developer community is still 10x larger.
This would be like saying coconut is unsuitable for use in pina colladas because it's much more prevalent as an ingredient in curry.
Anyone betting their money on Server side Swift better have a solid story to sell to upper management, why they did not went with Go, Java, .NET, C++20, Rust, OCaml, .....
Right now the only solid story is for Apple shops to share their client code with the server.
The problem is that if people are only using a language because they have to, then they are not as incentivised to create the open source projects that swift needs. Ruby had a large number of very enthusiastic users, that's what made the difference.
Swift has a very capable standard library, a high-quality, officially supported networking library, and fantastic C and Python interop which can fill a lot of the gaps to the extent they exist.
Even in its current state, I can imagine Swift being productive in something like server-less development, where it would offer a nice strongly typed alternative to scripting languages which currently dominate the space.
Swift has a lot of intrinsic features which would make it nice to use for server-side development, and I'm sure it would find plenty of users if there were a strong success story to point to.
Given the number of users, I'm not convinced the absolute number of Ruby users in 2009 was larger than the number of "swift enthusiasts" today.
I suspect that instead of an enthusiasm gap the greater negative impact on FOSS libraries comes from the Apple-platform dev community being strongly oriented around making consumer-focused programs for money.
Swift has already achieved that, Swift == Apple platforms.
From my perspective Swift is in a trailing group with Go and Rust, chasing C# and Java for new server/service development. Swift is behind, IMO, in supporting server-side development, but ahead in language adoption. That's why the SSWG makes sense.
(Probably C/C++ is used for a lot of new server development too, but I feel that's mostly unassailable, at least directly -- I think that's mostly on-going development in systems with heavy ties to existing C/C++ projects where they've already very seriously considered alternatives and rejected them.)
At least that was how things were around >10 years ago, not sure about the current state of things. Anyone can chime in? Do embedded vendors etc. provide proper forks of newish, modern compilers?
https://www.mikroe.com/compilers
https://www.astrobe.com/default.htm
https://www.ptc.com/en/products/developer-tools/apexada
If you add third-party ports and implementations, the list of platforms supported by Go and Rust increases exponentially; see for instance Tiny Go and the ongoing port of Rust to the Xtensa-based ESP32.
> Anyone can chime in?
I work in embedded and as far as my experience goes nowadays unless you go on extremely limited environments, the embedded chips I mostly see or develop for are either ARM (v7, like stuff from Nordic or the STM), or ESP32 (Xtensa). Every once in a while I have to work on some older projects which were based on Atmel or PIC, or very very very rarely MIPS.
It's certainly not like it was before; nowadays you can buy chips like the ESP32-WROVER which have relatively lots of RAM and storage for an absurdly cheap price. They run pretty well even if you opt for using C++17 and complex libraries.