Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Thoughts on "Go"?

by punkish (Priest)
on Nov 11, 2009 at 02:57 UTC ( [id://806394]=perlmeditation: print w/replies, xml ) Need Help??

Google announced a new programming language called "Go" see http://golang.org/

It is described as "expressive, concurrent, garbage-collected," which, to me, not only doesn't say much, but whatever it does say, sounds like a language that you and I already know.

Since languages are cultural, and are always evolving (and those that are not busy evolving are busy dying, to paraphrase our national bard), I seek your comments, musings, rants on this new language. Maybe we will even see an Inline::Go sooner or later.

Let's go.

Update: Names behind "Go" -- Robert Griesemer, Rob Pike, Ken Thompson, Ian Taylor, Russ Cox, Jini Kim and Adam Langley (see http://google-opensource.blogspot.com/2009/11/hey-ho-lets-go.html. Very impressive.

--

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re: Thoughts on "Go"?
by moritz (Cardinal) on Nov 11, 2009 at 08:29 UTC

    While glancing over the tutorial I saw that they stole one syntactic feature from Perl 6 (or maybe somewhere else, not quite sure ;-): no need for parenthesis around the condition in if statements, or around the statement list in for statements.

    I also find the idea quite intriguing to use an operator := which automatically declares the variable on the LHS; I'm curious how that will turn out in practice.

    But I guess the real killer app will be the concurrency support, and I'm neither qualified to comment on that, nor did I actually try it. If it provides Erlang-like good concurrency in an imperative programming language, it has a bright future ahead.

    However the lack of exceptions make me think of the auld C style return type checking, which is always forgotten somewhere, and surely not state of the art for a modern programming language.

    Perl 6 - links to (nearly) everything that is Perl 6.
      If it provides Erlang-like good concurrency in an imperative programming language, it has a bright future ahead.

      I recently came across CouchDB, which promises good concurrency, and is written in Erlang. Am really liking it. See http://couchdb.apache.org/.

      This Erlang with its concurrency sounds good. Where can I subscribe to it? I know not much about it. Is this something that has to be designed from the ground up? How is it in Perl 6?

      --

      when small people start casting long shadows, it is time to go to bed
        Is this something that has to be designed from the ground up? How is it in Perl 6?

        It has to be considered from the start, at least. Perl 6 has various design decisions that aim at making concurrency as painless as possible, including soft exceptions, contextual instead of global variables, hyper operators and feeds as well as keeping as little mutable state as possible.

        However concurrency hasn't been the one and only design goal for Perl 6, so I'm not sure if one can expect the same level of concurrency support as from Erlang. We'll see.

        Perl 6 - links to (nearly) everything that is Perl 6.

      Even if I switched to Perl6 alerady you'd not catch me skipping the parens. It just looks better with them. I don't have to put them around the condition in T-SQL either, but the only case when I don't is if the condition is a single exists (...). IMnsHO omiting the parents is just as clever as omiting the curlies in if statements in C or JavaScript. Something you can do, but sooner or even sooner it'll bite you.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.

        It's funny - lots of people have this reaction to the paren-lessness of Perl 6. "Yuck! I'd never leave them out!" Often with a rationale of some sort.

        A few weeks pass. The person gets comfortable with Perl 6. The scales come off; the parentheses go away.

        I've written a fair bit of Perl 6 code for 18 months now. I find the lack of parentheses easier to read and less cluttered than putting them in. After for, if, while et al., they simply don't have a purpose. They don't mean anything. The only reason other languages have them there is that they have things like braceless forms of those keywords, or that they cargo-cult C.

        It just looks better with them

        Can't agree with that, but taste is a personal matter.

        IMnsHO omiting the parents is just as clever as omiting the curlies in if statements in C or JavaScript. Something you can do, but sooner or even sooner it'll bite you.

        I can easily see the failure mode with omitting curlies in C or JS, but I don't see what could go wrong with ommiting the parens around the if condition. Care to elaborate?

        The only thing that might become confusing is when you use a map or grep with a block without additional parens. But that's only a rather rare case, and IMansHO not good reason to include visual noise in the general case.

        (I might also add that I've written a fair bit of Perl 6 code already and haven't been bitten by that)

        Perl 6 - links to (nearly) everything that is Perl 6.
Re: Thoughts on "Go"?
by BrowserUk (Patriarch) on Nov 11, 2009 at 09:13 UTC

    Wow! It's what D promised to be, before the pedants got a hold on it.

    Like I said:the future is threaded!

    Damn! Finally a reason to install a *nix implementation. Anyone know of a dist that runs well in MS VPC?

    Update: FYI, Ubuntu 9.10 installed first time and runs very nicely in VPC. (Getting GO to install there is a different matter, but mostly down to unfamiliarity with bash I think.)


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
And the bumps in the night?
by shenme (Priest) on Nov 11, 2009 at 21:21 UTC

    It makes me rather nervous to see a "systems programming language" of some years gestation that can say "exceptions remain an open issue" and yet doesn't immediately say 'what' their error recovery model is.

    If I look at their tutorial it seems to be checking returned error flags and/or results for abnormal conditions. Maybe it's the PBP koolaid but I was convinced manually checking for every possible error condition / combination, and everywhere, was not best practice and not scalable.

    My first impression is this is another interesting Google color thrown on the wall to

    • see if it sticks
    • see if the art gallery people say 'ooooo!'

    So, is this just very early days, or just 'goo'?

Re: Thoughts on "Go"?
by zentara (Archbishop) on Nov 11, 2009 at 16:47 UTC
    ...from the docs:

    Why is there no pointer arithmetic?

    Safety. Without pointer arithmetic it's possible to create a language that can never derive an illegal address that succeeds incorrectly. Compiler and hardware technology have advanced to the point where a loop using array indices can be as efficient as a loop using pointer arithmetic. Also, the lack of pointer arithmetic can simplify the implementation of the garbage collector.

    ....isn't that similar to the argument they use for most interpreted langs? .... like why learn c.... computers are fast enough now, that interpreters run plenty fast

    if i was to put in time learning something new.... i would go with something that allows me to make reliable external interfaces to the computer, like Ada


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
      i would go with something that allows me to make reliable external interfaces

      Doesn't this float your boat?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        it isn't the fact that it allows you to interface to the external world.....Perl lets me do that right now by writing directly to any memory address, which then all it needs is a PCI board, or just write to the good old Parallel port addresses and hook them to optoisolators thru a hacked printer cable. ...so why would i need another abstraction layer of software to write bit flips?

        .... the real test is can the lang prevent and/or automatically recover from system memory overruns or processor hijacking, and all that good hacking stuff, that you must design for in the real world..... as opposed to the win32 philosophy ;-)

        ...as far as that goes, i am quite happy with my experiences with Perl under Linux, and probably would risk my life that my program would perform well enough to gaurantee my safety..... however, that would preclude running other complex software simultaneously, which is connected to the internet...like web browsers running javascript.. :-)


        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku
Re: Thoughts on "Go"?
by Anonymous Monk on Nov 11, 2009 at 08:45 UTC
    whatever it does say, sounds like a language that you and I already know.

    You mean Perl, or parrot? Neither is a systems programming language (read BIOS, Bootloader, Operating System...).

Re: Thoughts on "Go"?
by tilly (Archbishop) on Nov 13, 2009 at 07:12 UTC
Re: Thoughts on "Go"?
by simul (Novice) on Nov 16, 2009 at 08:51 UTC
    Well thank goodness someone has had the cahones to use interfaces instead of inheritance.

    I've been saying that for years to no effect.

    I maintain the code for a context-oriented template language which I use to make web pages and find vastly superior to PHP or "template toolkit" or whatever.

    But man, I get kicked for not having objects and inheritance in my template language every time I talk about it publicly.

    Will people decry the lack of a "true" object oriented model in Go? Or perhaps would-be naysayers will be swayed by Google's halo?

      Well thank goodness someone has had the cahones to use interfaces instead of inheritance.
      I've been saying that for years to no effect.

      Weird, wasn't Java all about de-emphasizing inheritance to privilege interfaces instead? BTW, I've been saying it for years to no effect neither, but it hardly surprises me :)

      I maintain the code for a context-oriented template language which I use to make web pages and find vastly superior to PHP or "template toolkit" or whatever.

      Which is? care to share, perhaps?

      But man, I get kicked for not having objects and inheritance in my template language every time I talk about it publicly.
      Will people decry the lack of a "true" object oriented model in Go? Or perhaps would-be naysayers will be swayed by Google's halo?

      Object orientation may not be a primary concern for a system development language anyway. Or else.

Re: Thoughts on "Go"?
by educated_foo (Vicar) on Nov 13, 2009 at 06:19 UTC
    Names behind "Go" -- Robert Griesemer, Rob Pike, Ken Thompson, Ian Taylor, Russ Cox, Jini Kim and Adam Langley
    So everyone's a whore -- it just depends on the price. Google has a firehose of money from its ads, and has no idea how to spend it. Why not a new programming language?
Re: Thoughts on "Go"?
by Xiong (Hermit) on Feb 06, 2010 at 14:01 UTC

    No Go.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://806394]
Approved by moritz
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found