GeeCON Prague 2014*
The moose likes Other Languages and the fly likes General Questions for Mark Summerfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Languages » Other Languages
Bookmark "General Questions for Mark Summerfield" Watch "General Questions for Mark Summerfield" New topic
Author

General Questions for Mark Summerfield

Chun Chu
Greenhorn

Joined: Jan 11, 2011
Posts: 15
I am interested in the following:
  • What do you like about Go?
  • Any known projects out there that is currently using Go?


  • Thanks
    Mark Summerfield
    author
    Ranch Hand

    Joined: Jun 20, 2012
    Posts: 37

    Hi Chun Chu,

    Go is my favorite compiled language because it has a small clean syntax, and yet has very expressive semantics. I like its high-level channels/goroutines approach to concurrency. (Read "C++ Concurrency in Action" or "Java Concurrency in Practice" to see how difficult it is to get concurrency right when using low- or mid-level concurrency facilities.) I also find Go's approach to object-orientation---without the use of inheritance---to be very interesting. I like Go's Unicode support and the fact that you can work in terms of characters or bytes depending on what you are doing. I like Go's standard library---especially its powerful regexp library (based on RE2). And, of course, I love the fact that you can build even a large project really fast.

    Ultimately though, it is best to try it out to see if it suits you. (For example, I can program in Tcl, but the way Tcl works just doesn't fit how I think so I always find it hard. But Go seems to suit me very well, as does Python.)

    There are various Google Web Apps using Go now that it is an official language (alongside Java and Python). And quite a few small organizations have announced their usage. However, the software languages, libraries, and tools used by organizations---especially large ones---are often considered to be commercially sensitive, so I suspect there are quite a few larger players who are at least trying it without saying...


    Mark Summerfield
    "Programming in Go" - http://www.qtrac.eu/gobook.html
    Chun Chu
    Greenhorn

    Joined: Jan 11, 2011
    Posts: 15
    Thanks Mark

    So what have you done so far using Go? Are you involve with any particular project that is based on Go?
    Mark Summerfield
    author
    Ranch Hand

    Joined: Jun 20, 2012
    Posts: 37

    Hi Chun Chu,

    Some of my programming is for organizations---in which case I have to use the languages they specify (normally C++ or Python, very occassionally Java, JavaScript, Perl, or Tcl). I haven't been asked for Go yet.

    Some of my programming is tools for my own use. Most of my tools are written in C++ or Python since they were written before I knew about Go. So far I have rewritten one of my command line tools in Go: this tool extracts lines from source files and color highlights them using the lout typesetting language---I used it for all the code quotes in my Go book. The tool is just under 3,000 lines.

    I have also created some small open source libraries and applications over the years. The most popular one I maintain these days is DiffPDF which is written in C++/Qt4. I also have a useful one for GUI programmers called Alt_Key, again written in C++/Qt4.

    I would dearly love to migrate away from C++ to Go. For command line tools this is not only straightforward but a pleasure. For GUI applications there are already Go bindings to some GUI toolkits, but I think it is too early to commit at this stage.

    In general my approach is: write it in Python 3 if possible (because I've been using Python for so long that I write it faster than anything else); otherwise write it in Go (i.e., if speed and/or lots of concurrency is critical); otherwise write it in C++ (i.e., if you need third party libraries that don't have Go bindings and you don't want to write your own using cgo or SWIG).
     
    GeeCON Prague 2014
     
    subject: General Questions for Mark Summerfield