Just wondering.
Exploring Google's Go language, a modern day C with the Google in it.

How could it possibly be a legacy language? A legacy language is basically a language in which lots of software exists, which still needs maintenance as it is still being used a lot, but has fallen out of favor as far as starting new projects in it, usually because of more modern languages that are more appropriate to the contemporary landscape of software development.

Some old languages are not even legacy languages, because they never reached critical mass (e.g., too few people adopted it, it was flawed in some way, or never made it out of the "academic" conclave).

The Go language is too young to know which way it will go. All languages that have reached critical mass have pretty much taken 10 years or so to take off, like C, C++, Java, and some of the other now legacy-ish languages like COBOL and Fortran. Also, most language designs are pretty terrible in their first drafts. C was pretty bad before C89, during the "K&R" rough cuts of the language. C++ was pretty bad from 1985 to 1995'ish. Java was pretty rudimentary from 1995 to 2006.

The Go language is definitely still in its incubation period. I mean, it's barely 6 years old... it's almost a toddler. The same goes for the Rust language.

As it currently is, the Go language has some nice features but it also has some major flaws, as I have discussed on this thread. If they keep those flaws, I don't think that Go will be able to go very far. Many of its nice features are things that are easily reproducible in other languages (especially C++) with good libraries (Intel TBB, MS PPL, etc.) and compiler extensions (OpenMP, OpenCL/CUDA, C++ AMP), which means that Go has a lot of work to do to convince anyone that it is worth switching to it, instead of just coping with the non-native, but still pretty good, support for those features in industry-standard languages.

And as far as having a big name attached to a language, history has shown that that doesn't really have that much of an impact, and if anything, it's the opposite (languages that are "free" are often coming out on top). Microsoft is a big name, and they've designed and marketed more languages than any other company. And most of those languages have fallen flat, or were only adopted by a few gullible people. And beware of the hypocrisy that you can often see when big-name companies promote certain programming languages, while doing nearly all of their own in-house development on another language and while most big-name application companies are also rejecting that new language whole-sale. Apple promotes Objective-C but they do most of their stuff in C/C++. Google promotes Go/Java(Android) but they do most of their stuff in C/C++. Microsoft promotes C#, but mostly use C/C++, and they promote C#/.NET as the best way to write GUI applications, while nearly all big successful GUI applications are written in C++.

So Go is not a legacy language and has a suspekt future ahead.

Member Avatar for iamthwee

Haha Vegaseat I'm surprised you asked this.

Depending what you intend to use it for largely depends on its future. Where Go shines currently is within the web domain and possibly mobile applications - or soon will be at some point.

The way I see it, is Go will replace your dotnet and java applications. There are too many flaws with these technologies, sooner rather than later it wouldn't surprise me if they went the same way as flash. And good riddance if I'm honest.

'But Go doesn't have a proper GUI toolkit builder, my java and python apps do', I hear you cry.

Again, it's another prediction that will come to fruition no doubt. Front end GUIs will be contructed in HTML+js+cc as it is already cross platform, native and re-sizable, which was what the whole responsive web design buzz was about not so long ago. Any proper apps, 3D intensive will be written natively as they always have been done to that platform. -Watch this space.

As I said before, I believe Go will replace the dotnet, java, ruby and python proggers. In fact, large swathes of python users are already jumping ship, having the benefit of a somewhat 'expressive' syntax with fast run times.

I mean have you looked at writing a small concurrent program yet. It's nice, real nice. It pretty much summarises my shortcommings with php and ruby and dotnet or java. No bloated virtual machine or CLR, one binary, reasonable-ish expressive syntax, garbage collection, that actually should be what garbage collection is, and cheap concurrency in go routines and channels, that don't give you a headache like writing threads in c++.

It will pretty much take over the web domain languages. I don't doubt this one bit. As to systems probably not, many have tried to replace c/c++, and it has always stood the test of time.

As mike said it is still pretty much a baby, when they introduce generics and proper error handling it will get even better.

I am fairly certain that Vegaseat was poking fun at the 'Is Lisp a Legacy Language?' thread when he posted this. Or maybe at the whole concept of 'legacy languages' in the first place, especially when questions about new languages like Go also end up getting posted here for lack of a better place to ask. Really, I've always felt that 'Legacy Languages' is a poor name for this section in the first place, as it carries a certain judgement about the languages themselves.

<rant>
I mean, yes, no one is going to argue that languages like COBOL 65, FoxPro, Pilot, or MUMPS are not dated, but if people are still using them - and some are, amazingly enough - how is that 'legacy'? I can see the term 'legacy code', especially when applied to software where the source code, the translator, or the original target system no longer exist, but 'legacy language' really can only refer to one that is directly tied to an obsolete architecture in a way that it can't run on other systems (i.e., it isn't portable).
</rant>

Member Avatar for iamthwee

Damn you vegaseat it's been a long while since I've been duped like this. I gots to admit you had me fooled. ;)

Schol-R-LEA is correct, it would be nice if we could go with the modern times and post some Go goodies here. I got the itch! Sooner or later Go will be a Legacy language.

Would we need New Hopefulls forum?

Go has a goto without a comefrom, so that would make it a legacy language.

Here is an example ...

// guess_number101.go
//
// modified:
// http://golangcookbook.blogspot.com/2012/12/guess-number-game-v2.html

package main

import (
    "fmt"
    "math/rand"
    "time"
)

func xrand(min, max int) int {
    rand.Seed(time.Now().Unix())
    return rand.Intn(max-min) + min
}

func main() {
Again:
    myrand := xrand(1, 10)
    tries := 0
    var guess int

    fmt.Println("Welcome to Guess My Number Game!")
    fmt.Println("Guess a number between 1 and 10.")
    for guess != myrand {
        fmt.Printf("Take a guess(-1 to exit): ")
        // '\n' needed on Windows to take care of stupid '\n\r'
        // can use fmt.Scanln(&guess) behaves better with Windows OS
        fmt.Scanf("%v\n", &guess)
        tries++
        if guess < 0 {
            goto Done
        }
        if guess > myrand {
            fmt.Println("Too high!")
        } else if guess < myrand {
            fmt.Println("Too low!")
        } else {
            fmt.Printf("Good job! You guessed it in %v tries!\n", tries)
            fmt.Println()
            goto Again
        }
    }
Done:
}

Go has a goto, so that would make it a legacy language

Just because a language supports goto (regardless of the arguments for or against it) does not make it a legacy language. VB.NET and C# supports goto and they are certainly not legacy languages as do many other languages.

@djjeavons
just a tongue in cheek remark since I don't know where to put "golang" things on DaniWeb.

Oh, sorry, I'm rubbish at spotting things like that on forums unless it's in my face :)

I parked a few Go language snippets in the "Computer Science" Forum.

Another baby of a language is Apple's Swift. Apple has promissed to make it Open Source soon. They are also going to port it from iOS/OS X to Linux. I really love the syntax.

It's taught at Stanford University for iPhone and iPad apps.
https://www.youtube.com/watch?v=GOEPVM5OzJk&feature=youtu.be

A great lecture series by Professor Paul Hegarty! He uses Apple's Xcode IDE to build the apps and brings out the many fine features of the Swift language.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.