News for hackers. Stuff that matters.
Re:Go is Google's language, not ours by ipsum2 on Wednesday May 22, 2019 @02:48AM (#19978473)
I'm curious what the distinction is between Rust (driven by Mozilla) and Go (driven by Google).
Re:Go is Google's language, not ours by calcifer on Wednesday May 22, 2019 @03:05AM (#19978576)
By my count, fewer than half of Rust's core team [1] are Mozilla employees, whereas the number is 100% for Go. Rust also has a very clear and open governance model [2], where the Go team is more closer to "we'll do what we want".

[1] https://www.rust-lang.org/governance/teams/core [2] https://www.rust-lang.org/governance

Re:Go is Google's language, not ours by juststeve on Wednesday May 22, 2019 @04:56AM (#19979229)
The governance stuff is interesting; are there any programming languages that are structured in between "community driven" and corporate oligarchy? ie. non-profit with dedicated Finance/HR teams?
[dead]
Re:Go is Google's language, not ours by japanoise on Wednesday May 22, 2019 @06:52AM (#19979785)
What an astoundingly ignorant thing to say
Re:Go is Google's language, not ours by 0815test on Wednesday May 22, 2019 @06:58AM (#19979820)
It'll be that too, eventually. But not yet!
Re:Go is Google's language, not ours by ncmncm on Wednesday May 22, 2019 @02:53AM (#19978508)
Rust has largely broken out of Mozilla already. If it can maintain its growth rate (not guaranteed, but so far so good) it will have a future. Check back in five years.
Re:Go is Google's language, not ours by baby on Wednesday May 22, 2019 @11:03AM (#19981946)
It's a very different language than Golang though, very expressive, generics, no GC, etc.
Re:Go is Google's language, not ours by ncmncm on Wednesday May 22, 2019 @07:53PM (#19986889)
You say that like those are bad things.

Yes, the borrow checker is a PITA vs. Go, but there are compensations.

Re:Go is Google's language, not ours by baby on Thursday May 23, 2019 @02:17AM (#19988984)
These are not bad things if you’re writing system code.
Re:Go is Google's language, not ours by spopejoy on Friday May 24, 2019 @02:10PM (#20003944)
Is there ever a plan for GC?
Re:Go is Google's language, not ours by remram on Friday May 24, 2019 @04:40PM (#20005093)
There are garbage collection libraries in progress: rust-gc[1] and shifgrethor[2]. If you mean language support, then no, not really, though it was discussed in https://github.com/rust-lang/rfcs/issues/415

[1]: https://github.com/Manishearth/rust-gc [2]: https://github.com/withoutboats/shifgrethor

Re:Go is Google's language, not ours by collinmanderson on Sunday May 26, 2019 @03:39PM (#20016975)
I feel like not having a GC is rust’s biggest advantage over higher level languages. It allows rust to work in environments that only languages like C, C++ can work in. (Embedded, shared libraries, etc)
Re:Go is Google's language, not ours by spopejoy on Saturday June 08, 2019 @09:17PM (#20136342)
I more meant "GC for those who want it", as advanced GC with Edens and mark-sweep tenured generations can handle high-allocation and large-heap scenarios that are extremely challenging for simpler MM approaches. I don't know if this really can be done as a library though.
Re:Go is Google's language, not ours by ehsankia on Wednesday May 22, 2019 @03:02AM (#19978553)
I had a similar question, but rather, what's the difference between Go with Google deciding what goes in, and Python (a year ago) where the BDFL and a couple core devs decide what go in?

Sure you could argue that a company may have different incentives than a BDFL, but in this context, it's not clear that Go would've been more likely to accept the change you're proposing if they weren't being led by Google.

Re:Go is Google's language, not ours by uranusjr on Wednesday May 22, 2019 @03:30AM (#19978734)
I guess the most important distinction is the “B” part (benevolent). Guido is called that because he is known (since before BDFL is a thing) to listen to other people, and adapt when they disagree strongly with his decisions. Google has never demonstrated the same attitude afaict, and in multiple occasions showed exactly the opposite.

Edit: And to answer the question, no, there’s no philosophical differences. And there’s nothing wrong with that. Python never called itself a community’s language (there are instances core devs said in no ambiguous terms that it is Guido’s project). The problem only arises if a project gives an impression that it is owned by the community when it actually isn’t.

Re:Go is Google's language, not ours by remus on Wednesday May 22, 2019 @04:02AM (#19978955)
Given that the go core team has committed to adding generics I don't think it's fair to say they don't listen to critique from the community. Is there a more contentious issue in go?!
Re:Go is Google's language, not ours by pjmlp on Wednesday May 22, 2019 @04:36AM (#19979134)
Not really, that is the hand waving when the issue ever pops up.

Rob Pike already stated publicly that he is against the proposed idea for Go 2.0.

"Rob Pike - Go 2 Draft Specifications" - https://www.youtube.com/watch?v=RIvL2ONhFBI

Re:Go is Google's language, not ours by civility on Wednesday May 22, 2019 @05:25AM (#19979378)
I wonder if they'd ever consider adding hygienic macros instead of templates/generics. To me, that solves the problem of needing to write the same code for float32+float64 and so on. And it doesn't require so much careful thought about the type system, accidentally creating an awkward metalanguage like happened in C++.
Re:Go is Google's language, not ours by marcosdumay on Wednesday May 22, 2019 @06:29PM (#19986237)
Rust people are very glad that Rust brought high-kinded types to replace the most common uses of hygienic macros. Using macros for everything is a nightmare.

About using them as generics, how do you enforce constraints? Unconstrained generics won't lead you far (or better, will lead you far into JS's Wat territory).

Re:Go is Google's language, not ours by civility on Thursday May 23, 2019 @02:40AM (#19989112)
IMO, Rust has a very nice macro system, and this is a good thing (although I'm not familiar with any changes they've made in the last year or two). It's a bad thing that sometimes one needs to resort to the macro system because other features in Rust don't play well together, but that's a long topic with no solution in sight.

> About using them as generics, how do you enforce constraints?

I'm really thinking about the case for numerical algorithms where the exact same code works for different types (say float32 and float64 in Go). It sucks to copy and paste hundreds of lines of code and it sucks to have a separate code generator write your file for you (essentially an external macro processor). Imagine something like the C preprocessor for Go, but without the well known flaws of the C preprocessor:

    #define IMPLEMENT_FOOBAR(NAME, TYPE) \
        void NAME(TYPE* ptr, long len) { \
           hundred lines of implementation here \
        }

    IMPLEMENT_FOOBAR(foobar32, float32)
    IMPLEMENT_FOOBAR(foobar64, float64)
That parametric polymorphic enough for a lot of use cases, and this could work with data structures too.

As for constraints, you can pass function names as arguments too. For instance:

    IMPLEMENT_SORT(sort_baz, baz, bazcompare)
Other proposed features in go, such as the "check" statement for error handling, are probably implementable as a nice macro if you had a good macro language. This means the core language wouldn't have to grow, and features like "check" could be imported from a library. Including features like this in a library means the core language isn't bound by backwards compatibility when a better idea comes along. Old code used the old library, new code uses the new one, and the language stays clean and compatible with both.
Re:Go is Google's language, not ours by pjmlp on Thursday May 23, 2019 @03:15AM (#19989312)
This is how Borland C++ provided support for generics before they got into the ongoing ANSI/ISO standardisation process.

For their first implementation of BIDS, initially provided with Borland C++ 2.0 for MS-DOS.

Finding out the release date is left as exercise for the reader.

Re:Go is Google's language, not ours by iopq on Thursday May 23, 2019 @04:43AM (#19989730)
I see you're reinventing C++
Re:Go is Google's language, not ours by civility on Thursday May 23, 2019 @07:17AM (#19990617)
I guess you missed the part above where I mentioned C++ templates as a cautionary tale about accidentally creating an awkward metalanguage. Besides, Go and Rust are both clearly responses to C++, so it makes sense they would try to provide (reinvent) similar capabilities while avoiding the flaws.
Re:Go is Google's language, not ours by steveklabnik on Wednesday May 22, 2019 @07:46PM (#19986831)
Rust does not have higher kinded types.
Re:Go is Google's language, not ours by chimeracoder on Wednesday May 22, 2019 @10:47AM (#19981750)
> Rob Pike already stated publicly that he is against the proposed idea for Go 2.0.

Rob Pike is not a member of the Go team anymore, and he has not been for several years.

Re:Go is Google's language, not ours by hwj on Thursday May 23, 2019 @01:20PM (#19993738)
That's sad. Was it because of disagreements?
Re:Go is Google's language, not ours by chimeracoder on Thursday May 23, 2019 @01:30PM (#19993855)
> That's sad. Was it because of disagreements?

No, he moved to work full-time on Upspin: https://github.com/upspin/upspin

Re:Go is Google's language, not ours by baby on Wednesday May 22, 2019 @11:02AM (#19981934)
Wow. That makes me happy. The last thing we need in Golang are generics.
Re:Go is Google's language, not ours by vinceguidry on Wednesday May 22, 2019 @07:44AM (#19980077)
Wasn't Linus the original BDFL?
Re:Go is Google's language, not ours by zimpenfish on Wednesday May 22, 2019 @11:56AM (#19982530)
Seems to have been Guido.

https://en.wikipedia.org/wiki/Benevolent_dictator_for_life

> The phrase originated in 1995 with reference to Guido van Rossum, creator of the Python programming language.

Re:Go is Google's language, not ours by thrower123 on Wednesday May 22, 2019 @07:54AM (#19980139)
I think the B stood for something else in his case...
Re:Go is Google's language, not ours by lllr_finger on Wednesday May 22, 2019 @09:06AM (#19980703)
There are some who would argue it's a "soft B" - his recent conf outburst isn't the only example of him failing to listen and adapt.
Re:Go is Google's language, not ours by simonh on Wednesday May 22, 2019 @03:28AM (#19978719)
Guido always took the role of gatekeeper and arbiter (I'll consult with the community and decide what submissions go in) rather than a true dictator (I'll decide what goes in... submissions? What submissions?).