Skip to content

Comment on With book on Go, Kernighan guides students at Princeton and beyondparent

Comments

Do you think Go will become "the" language students and beginners are taught? Why? (I'm genuinely curious!)

I (and a lot of other French students) have started programming during my bachelor's mainly in Java and C. I now develop in Golang and I know it would have been better for me to start with it:

- The logic of Golang is straightforward, e.g. you need to import the package fmt to do a fmt.Println("") in Golang but you do not need to explicitly import anything to do a System.out.println("") in Java. Some things could still be weird for a beginner, e.g. methods like len(), but the official documentation gives a clear explanation about a lot of things.

- gofmt, the best way for a beginner to understand what is pretty code. Golang forces you to write clear code (e.g. no unused variable) and that is an excellent way to learn as a beginner.

- The goroutines / gochannels are simple to understand, I wish I would have started concurrent programming by developing in Golang instead of C.

- Golang works on every computers and installing it is simple (simpler than installing Java and Eclipse).

This list is subjective, other languages like Python are also excellent for new developers from what I heard but Golang could also do the job.

- The logic of Golang is straightforward, e.g. you need to import the package fmt to do a fmt.Println("") in Golang but you do not need to explicitly import anything to do a System.out.println("") in Java.

You don't need to import println in Go[0]. The logic is exactly the same[1]: there's a pre-imported "prelude" (java.lang in Java, builtin in Go) and you import the rest.

- Golang works on every computers and installing it is simple (simpler than installing Java and Eclipse).

Why do you have to install go alone but java and eclipse?

[0] https://play.golang.org/p/ZWLaVuJNgq you don't need to import append or cap or complex128 either

[1] and the same as in more or less every language out there

What's interesting is that Go (and its predecessors, Limbo and Newsqueak) is strongly influenced by Niklaus Wirth's languages, especially Oberon, both syntactically and in its design and simplicity. Before C++ and Java, Pascal and its cousin, Modula/Modula-2, were widely used as teaching languages. So it wouldn't be too surprising if Go becomes popular as a teaching language. Wirth's languages are all eminently suitable for this purpose.

(Pascal was originally designed to be a language for teaching, and also became widely used to write pseudocode for algorithms, which you'll find in a lot of technical CS papers; the pseudocode tends to be a close approximation of Pascal.)

I would be surprised. Java is the standard language in most universities and colleges, because it's what the industry (outside our little bubble) asks[1]. If anything, universities tend to favor Python as the alternative to Java, because of its rich ecosystem of scientific libraries (numpy, SciPy, Theano, etc.), easier explorative programming (through the REPL and IPython), etc.

[1] There is/was some educational value in using Java as a teaching language, but there are far better choices now.

I think it is a bad idea to teach a language without a REPL as a first language. Mames that learning curve much steeper since responses are so slow.

I'd say that it will reach majority status in introductory courses for U.S. universities by 2020.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.