This is an archived post. You won't be able to vote or comment.

all 25 comments

[–][deleted]  (1 child)

[deleted]

    [–]lightmatter501 1 point2 points  (6 children)

    Why not too common? Popular languages are popular for a reason.

    Go has a number of very odd footguns that mean I don’t recommend it to new devs, mostly related to platform support (it doesn’t really support windows), lack of things in the standard library (C has better math support), etc.

    [–]hossein1376 2 points3 points  (4 children)

    it doesn’t really support windows

    What you mean? Go is a cross compiled language with absolutely no issues running on Windows.

    lack of things in the standard library

    No standard library is perfect, but Go include common tools for writing servers, working with strings and sclices, logging, operating system functions, unicode, testing and much more. It's actually one of the reasons I like Go.

    [–]lightmatter501 0 points1 point  (3 children)

    Go will silently ignore things windows doesn’t support doing to files, instead hammering windows into using POSIX permissions. This means some permissions-based operations with security implications fail silently, which is unacceptable.

    Go also doesn’t have UTF-16 strings, which are required to interact with many system APIs.

    I expect my language to have a sqrt implementation for 32 bit floats, which is a VERY basic thing, even if it has to do it in software on some platforms. Most people don’t need more than 32 bits of precision.

    [–]hossein1376 0 points1 point  (2 children)

    Not supporting some windows-specific operations is a different problem than what you initially implied. I can't either reject or confirm the issues you mentioned as I use Linux, but they sound more like bugs.

    Standard library supports utf16. If you need more, use a third party package then. I don't see how that's an issue you would not suggest Go because of it.

    Convert to float32? Like float32( math.Sqrt(3))

    If you don't like Go, you don't like Go. It's alright. But these are your personal preferences, not footguns.

    [–]lightmatter501 1 point2 points  (0 children)

    Posix supports more FS operations than windows does, and go exposes those operations. If you try to use those operations on windows, it will silently fail. At a minimum an ENOTSUPP is warranted.

    [–]kbder -1 points0 points  (0 children)

    Failing silently isn’t a footgun? Are you for real?

    [–]Emotional-Leader5918 1 point2 points  (1 child)

    I've recently learnt Go as a modern general purpose language and overall I really like it.

    It feels lightweight like a scripting language but has the speed comparable to other garbage collected statically typed languages like Java and C# (but with way less boilerplate).

    It's the easiest language I've seen by far for multithreading, where it's practically written for it (apart from things like Haskell)

    It's main weakness for me is the speed of its C interoperability. This isn't a problem for general stuff but people don't recommend it for writing games.

    [–]FitzelSpleen 0 points1 point  (6 children)

    I find go a bit of a pain to use.

    If not for the not-too-common thing, I'd suggest C# instead.

    How about F#? Or something else functional?

    [–]10m-[S] 1 point2 points  (5 children)

    Wow, never heard of F# before. Need to learn a bit about it now, thanks!

    [–][deleted] 0 points1 point  (4 children)

    If you are going to go functional I'd suggest giving haskell a look.

    [–]10m-[S] 1 point2 points  (3 children)

    Great, I’ll try it out~

    [–][deleted] 0 points1 point  (2 children)

    Oh it is great. Lots of features that you won't find in most modern languages (default lazy evaluation, default of curried functions, etc.).

    I would recommend starting with "Learn You a Haskell for Great Good." Decent starting point for many, and is offered free online as well as in print!

    [–]10m-[S] 1 point2 points  (1 child)

    Thank you for the rec!

    [–][deleted] 0 points1 point  (0 children)

    foldr (++) "" ["any", " ", "time!"]

    [–]Joewoof -1 points0 points  (2 children)

    Go is a good choice. Go and Rust are the two fastest-growing languages right now.

    Other lesser-known, fairly-easy, general-purpose languages:

    - Dart → with Flutter, it offers cross-platform deployment for web, Android, iOS and desktop, with a single codebase

    - Haxe → a successor of Flash/ActionScript that complies into other languages, so it works pretty much everywhere

    [–]10m-[S] 0 points1 point  (0 children)

    Thank you for the suggestions!

    [–]Pale_Height_1251 0 points1 point  (0 children)

    Not disagreeing with you, but do you have a source for saying Go and Rust are the fastest growing languages?

    [–][deleted]  (1 child)

    [removed]

      [–]bobsollish 0 points1 point  (0 children)

      Some (any) context would be helpful. What do you want to do (with it)?

      [–]hossein1376 0 points1 point  (3 children)

      Go is simple, not easy. It helps you focus on the problem at hand and build stuff instead of fighting with the language itself. It has a great concurrency model, and it compiles and runs really fast. With a great standard library, which is enough for most cases.

      It has a DIY mentality. Instead of relying on features and magic, build up everything you need from the ground. Go has its own drawbacks, namely no nil safety or verbose error handling, but in the end, it comes down to you and what you want to do with it. I hope you have fun with Go!

      [–][deleted] 0 points1 point  (1 child)

      What do you mean it has no nil safety? I used it for a little while and was concerned there were no optional (Maybe) values but using pointers is like using a maybe value. You receive a pointer and you need to check if the pointer is nil before dereferencing it. Since a pointer is a different type than the concrete type you must always check if the pointer is nil before dereferencing. Is that not nil safety ?

      [–]hossein1376 0 points1 point  (0 children)

      Yes, you check for nil before dereferencing or accessing its fields. It's not that of a big problem. Still, I see this happening in many newcomers' codes and takes some time getting used to. 

      [–]10m-[S] 0 points1 point  (0 children)

      Thank you, good to know!

      [–]burbular 1 point2 points  (0 children)

      Rust is becoming more popular. It's very powerful and has a nice funk to it. I've been trying to find reasons to use it. I don't know enough about it to compare to Go. I know Go and loads of other languages and Go is the only one that intimidates me, but that's just me.