Live data from Hacker News

Go is Google's language, not ours

utcc.utoronto.ca

601–610 of 679 posts

Re: Go is Google's language, not ours

#601
post #24

Actually there are relatively few real (TM) open source projects driven by the community, at least if you look at important projects. Many open source projects are just commercial projects driven mainly by a single company. Look for example at Redis, MongoDB, MySQL, and Elasticsearch. They follow exactly the model described in the article. Technologies like these could have been developed by a community, too, but it…

The simple and sad truth: -Nobody gets fired for buying Oracle. -It's easy .. explaining an investment in open source .. good luck

"We'll save $500k a year in licensing costs and don't need to re-negotiate a contract to update our architecture" has worked for me.

Re: Go is Google's language, not ours

#602
post #155

Earlier quoted context omitted.

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

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++.

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

#603

Earlier quoted context omitted.

Companies pay Oracle because 1) PostgreSQL doesn't take you to lunch and 2) Oracle "just works." I mean, we all know #2 is effectively a lie but having the option to go to Oracle directly for issues (even if the response is just "pay a contractor") immensely reduces risk for executive leaders.

Are they paying Oracle though? A quick Google found this: https://seekingalpha.com/article/4229086-oracle-growth-dead If Oracle revenue is no longer growing, maybe new development leans more towards Postgres and other open source offerings?

> Revenue US$39.83 billion (2018)

Even not growing, they are indeed paying Oracle.

Re: Go is Google's language, not ours

#604
post #573
post #550

Earlier quoted context omitted.

async/await is fantastic and pretty much the direct inspiration for the exact same feature om ES6, where its a godsend. C# i s one of the best dev experiences in any language/IDE

Async/await is fantastic compared to not having anything at all. It's a big downside compared to other things you can do (cf Go, Erlang), and hard to get rid of. It's the classic case of getting easy short-term benefits at the expense of long-term costs. It's main benefit from an implementor's perspective is that it's better than nothing and very cheap to implement quickly. Just as .NET has lived to regret reified ge…

The other main alternative to `async/await` with the Promise/Task/future-paradigm is Rx's Observable - but let's not pretend that because Observable is capable of handling every situation that Promises can doesn't mean we should use it everywhere - Angular tried that when they changed their HTTP client library to use Observable instead of Promise because they wanted to expose retries and other nifty logic - but in doing-so made the learning curve a vertical brick-wall for everyone involved (and now we can use Promise with support for retries and better error-handling anyway) in addition to adding a very hard dependency on a fast-moving project (e.g. Angular 6 comes with a load of RxJS compatibility shims because RxJS radically changed their API design (again)).

Go's goroutines seem okay - but I don't like how much control they take away from the programmer. For example, last year I worked on calling-into a black-box C DLL from a Go program and we learned the C DLL had code that was actually simply terminating the thread inside of it (by design!) because the author of the C DLL assumed ownership of the thread. That caused a problem for us because Go's goroutines are scheduled by the Go runtime and it will never let you give-up ownership of a Go thread - and I couldn't see how I could use my own thread (e.g. getting a thread from a native OS call to keep it outside of Go's control) with goroutines. The project was almost DOA after we learned this, fortunately we convinced the author to always return instead of killing the thread. I'm not sure if anything's changed in Go since then that would have made things easier for us. But since then we haven't used Go for anything new. The only reason we used Go was because it gave us binaries that "just worked" for Windows, macOS and Linux without having to worry about Java, .NET and other dependencies - but I wasn't happy about the ~20-30MB-sized executable output.

Re: Go is Google's language, not ours

#605

Earlier quoted context omitted.

Interesting, that I saw a similar pattern like "at first I complained, but as time went on I found some benefits" quite a lot. It can be that your learn a language better, became more comfortable with the way it must be used: say, stopped writing code in Elixir the way your used to write in Python. But the other thing is that it's in our human nature that we tend to look for something positive in bad situations we ex…

My enjoyment using any given language always tends to grow as I get more productive with it, even if I have a more general dislike for the language itself. Making computers do things is fun (usually)! The programming language is (almost) immaterial - depending on the task at hand of course. Despite myself, I've even found myself enjoying JS in the few times I had no choice to avoid it. shudder

I think JS is very fun to write. It's making sure it does what I want it to do that is irritating.

Re: Go is Google's language, not ours

#606
post #573

Earlier quoted context omitted.

Async/await is fantastic compared to not having anything at all. It's a big downside compared to other things you can do (cf Go, Erlang), and hard to get rid of. It's the classic case of getting easy short-term benefits at the expense of long-term costs. It's main benefit from an implementor's perspective is that it's better than nothing and very cheap to implement quickly. Just as .NET has lived to regret reified ge…

The other main alternative to `async/await` with the Promise /Task /future -paradigm is Rx's Observable - but let's not pretend that because Observable is capable of handling every situation that Promises can doesn't mean we should use it everywhere - Angular tried that when they changed their HTTP client library to use Observable instead of Promise because they wanted to expose retries and other nifty logic - but in…

What we're doing in Java is letting you choose, for each sequential computation, whether you want a heavyweight (kernel) thread or a lightweight usermode thread (like a goroutine), and if you choose the latter, you can use your own scheduler (schedulers are written in Java, and aren't a part of the runtime). No promises, no observables, no async/await, and no thread control issues.

Re: Go is Google's language, not ours

#607

Earlier quoted context omitted.

Rust does support multiple major versions of dependencies in a build. The only thing we don’t allow is multiple copies of dependencies that link to native libraries, and the -sys pattern means that this is rarely an issue in practice.

Wait just a second! :-) 1. Yay! 2. Yes, native libraries would be difficult. Or impossible. 3. Could you elaborate on the "-sys pattern"?

https://doc.rust-lang.org/stable/cargo/reference/build-scrip...

Re: Go is Google's language, not ours

#608

Earlier quoted context omitted.

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++.

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).

Rust does not have higher kinded types.

Re: Go is Google's language, not ours

#609

Earlier quoted context omitted.

So what if I have an object that has a pointer to another object? memcpy is not what I want in that instance.

If you mean intrusive data structures, Rust just doesn't support them. Everyone still manages to write software in Rust just fine. (There's some early support for immovable data with `Pin`, but that's only exposed via async/await at the moment.) Move constructors are one of the worst parts of C++ and being able to write movable, intrusive data structures is absolutely not worth the cost. If you do need one, Rust show…

Safe rust may not support them, but you can use unsafe to write them. There’s a bunch of implementations of intrusive collections on crates.io.

Also, Pin is stable but async/await is not, so you’re backwards there :)

Re: Go is Google's language, not ours

#610
post #429
post #46

Earlier quoted context omitted.

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.

It's a very different language than Golang though, very expressive, generics, no GC, etc.

You say that like those are bad things.

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

Post reply on HN