fusionlanguage / fut

Fusion programming language. Transpiling to C, C++, C#, D, Java, JavaScript, Python, Swift, TypeScript and OpenCL C.
https://fusion-lang.org
GNU General Public License v3.0
1.76k stars 55 forks source link

Increase popularity of Fusion by adding support for Go #45

Open danon opened 3 years ago

danon commented 3 years ago

Go is a lower-level language similarly to Ć in my opinion, and it's really popular now.

I think you could get Ć very popular, if it supported go.

pfusik commented 3 years ago

Do you have data to support this claim? My personal opinion is that Go had its five minutes years ago and now Rust is what everyone is talking about.

Obviously gaining maximum popularity is not my goal. If it were, I would name this language differently. ;)

danon commented 3 years ago

I don't have any data to back this claim, it just my subjective opinion.

danon commented 3 years ago

We can try to look at Google Trends

image

We can see Java and PYthon are the kings, Go is lower than C++, and Rust isn't even visible

pfusik commented 3 years ago

A well-known programming language popularity index is TIOBE. Rust is 26th, Go is 12th, but I'm more interested in PHP which is 9th.

danon commented 3 years ago

Okay, I can help you with PHP, since I know the langauge to the bone, different versions too.

Rudde commented 2 years ago

Do you have data to support this claim? My personal opinion is that Go had its five minutes years ago and now Rust is what everyone is talking about.

Obviously gaining maximum popularity is not my goal. If it were, I would name this language differently. ;)

I think both Go and Rust are relevant languages here. I would love to see both. But as java and javascript have limited the meaning of what an Uint32 actually is, I assume rust at least would require the entire Ć as a whole to be way more verbose, to ensure the Rust generated is secure, unless the Ć compiler does a lot of assumptions for us.

What is the challenge with adding new languages? Is it the initial time sink or the maintenance? I saw D was here before but removed, why was it removed?

pfusik commented 2 years ago

The question is how well Ć maps into these languages. I don't know Go or Rust, but I've heard that Go doesn't support inheritance and Rust doesn't support copying references. One needs to design how to work around these limitations.

I would prefer to have great backends for a selection of languages rather than partial or experimental support for lots of languages. Ć is going to evolve, so each new backend increases the ongoing cost.

The D backend was contributed in 2011. At that time Ć was very different from what it is today. I started a rewrite in 2014 and intentionally traded the D backend for C++, which is a more popular language. I expect the D backend to be rather easy to write. #34 tracks that.

danon commented 2 years ago

@pfusik Do you think support for Ruby would be as easy as for Python? They're quite similar.

I would prefer to have great backends for a selection of languages rather than partial or experimental support for lots of languages.

Yes! Absolutely!

pfusik commented 2 years ago

I consider Ruby a mixture of Perl and Python and there was a Perl backend in 2013. So yes, I believe Ruby should be straightforward. However, my experience with Ruby is limited.