News for hackers. Stuff that matters.
Re:Why did we choose Rust to develop TiKV? by peoplewindow on Wednesday September 27, 2017 @09:44AM (#15347697)
Re your last part - is that fair? It's very common that programmers have to end up maintaining code written in languages they don't like, due to the original authors moving on, lack of better jobs in their area, whatever.

People advocate against Go partly because they'd rather not have to work on Go codebases in future.

Re:Why did we choose Rust to develop TiKV? by jjuel on Wednesday September 27, 2017 @10:38AM (#15348193)
Well I don't want to work on C++ or Rust in the future should I go into every thread about it and slam them for their shortcomings? Should I call every dev that uses them stupid? That is what he was talking about. You can not like the language, but don't call people who do like it and use it idiots. There are better ways to get your points across.
Re:Why did we choose Rust to develop TiKV? by peoplewindow on Thursday September 28, 2017 @11:10AM (#15357625)
People do! But not as much with C++ because it's very rare to find a C++ developer who is genuinely in love with the language and is unaware of its faults. Not many people starting new C++ codebases today unless they feel they have no credible alternative choice.

To a lesser extent the same is true of Rustaceans - they tend to be well aware of the constraints of their language, and won't try to defend it or pump it outside of some specific use cases. Nor do the Rust designers who are fairly humble.

Nobody should be calling Go users stupid. But they typically don't. At least not here. The language itself, on the other hand ...

Re:Why did we choose Rust to develop TiKV? by jaredklewis on Wednesday September 27, 2017 @01:02PM (#15349818)
Welcome to HN lol. You’ve got it easy. Try being a front end dev, because as HN will tell you, none of us know anything about computer science, which is why we are wasting our lives making over engineered bloated shit. And we have a obsession with novelty, which is why all our technical decisions are based on what is currently fashionable.

HN is not a very understanding place...

Re:Why did we choose Rust to develop TiKV? by model_m_warrior on Wednesday September 27, 2017 @01:10PM (#15349903)
Indeed, Front enders will never be the geniuses the people writing ad hoc CRUD operation end points are.
Re:Why did we choose Rust to develop TiKV? by Thaxll on Wednesday September 27, 2017 @11:59AM (#15349101)
The reason is people have no clue about Go most of the time and advocate against it because it's popular. Pretty much like Node ect... I mean look at Erlang derivates / Haskell / Rust, you don't see negativity in related language.
Re:Why did we choose Rust to develop TiKV? by candiodari on Wednesday September 27, 2017 @12:13PM (#15349245)
Or perhaps they're language geeks. Go is truly a horror show when it comes to programming language concepts. Everything about go is a complete special case. Select ... has it's own type system exceptions (and so many exceptions you might as well say Go simply has different type systems for all built in types, for all built in functions, and for several special forms). Make ... ditto. New ... ditto. "Go" same. Channels ? Effectively a separate type system. Dicts ? Same. And so on.

Everything is a compiler exception. Nothing makes sense. Nothing.

The absolute worst in Go, in my opinion, is the "range" function/special case. It is return-type polymorphic. That's right, it does different things depending on what you assign it's result to (not even C++ dared to go there). Not parameter polymorphic, return type polymorphic. "Assign" a range to one variable, does X, two variables, does Y, nothing ? does something else yet again, channel ? Again something else and all of these are special cases in the type system (same -but not quite the same, of course- with case, channels and dicts, by the way)

Needless to say, even though you have to assign ranges to things in Go, that's the only way to use it, that assignment does something entirely different from any other assignment in Go's type system.

Go is how to make a language extremely dumb and yet make have a type system that can't be (fully) described shorter than Haskell's.

Re:Why did we choose Rust to develop TiKV? by PopsiclePete on Wednesday September 27, 2017 @01:48PM (#15350365)
I love Go and agree with everything you said.

I was never good at computer science-y "language theory" type stuff. I believe you when you say that Haskell or Forth are better languages - I just can't use them worth a damn.

Go is a practical language for me - it's not beautiful, or elegant, the type system is only 70% there, can be verbose, etc, etc, but it allows me to put my code in production and have a very high level of confidence that I won't get a phone call at 4 am. I don't have that confidence with Ruby, or Python, or Javascript.

I find that Go is very easy to pick up, and hard to really fuck up. Most people at my company can read my code and I can read theirs, which is mind-boggling to me. Go somehow achieved what I thought was impossible - to read and grok quickly other people's code.

Go sees was developed by "engineer" types - not "language nerds". And, yes, it shows.

FWIW, I also love Rust and C, but will choose Go over Rust any day when my productivity and dead-lines are more important than close-to-C performance.

Re:Why did we choose Rust to develop TiKV? by Thaxll on Wednesday September 27, 2017 @12:41PM (#15349579)
I don't code at work for programming language concept, you see you should use the tools that make sense for the task you're working on. I'm not being paid to have fun on using an academic language that no one use, have bad tooling, not enough libraries to work with. You never wonder why pretty much no one uses Haskell / Erlang if it's that great? Having the best language concepts doesn't mean a thing in the real world. I try those things at home not at work where $$$ is at play.
Re:Why did we choose Rust to develop TiKV? by peoplewindow on Thursday September 28, 2017 @11:13AM (#15357641)
He wasn't saying use Haskell instead. It was a comparison of the complexity of the type system vs power provided.

Most Go programs could have been written in Java, Scala, C# or Kotlin and been shorter, more predictable and probably faster. Certainly more maintainable (ok maybe not for Scala).

Re:Why did we choose Rust to develop TiKV? by Vendan on Wednesday September 27, 2017 @01:46PM (#15350329)
Range is hardly return-type polymorphic. It always returns the same things, you are just free to ignore them, i.e.

  for k := range map { }
is the same thing as

  for k, _ := range map { }
Would requiring the second version instead of the first actually be that much of an improvement?

The only true return-type polymorphism is type assertions, which is reasonable in my mind cause I don't think ignoring the "assertion failed" should ever be a logical thing to do.

Re:Why did we choose Rust to develop TiKV? by candiodari on Wednesday September 27, 2017 @11:09PM (#15354253)
Ok. Now consider what happens with slices/arrays instead of maps.

  1) for k := range list {}

  2) for k, i := range list {}
In python, the equivalents are:

  1) for x in lst:

  2) for x, y in enumerate(lst):
So are these "the same" ? No.
Re:Why did we choose Rust to develop TiKV? by Vendan on Thursday September 28, 2017 @08:23AM (#15356558)
more accurately it's

  for index := range list {}
and

  for index, value := range list {}
Yes, these 2 version do perform very similarly, you are just ignoring the second return value in the first version, i.e.:

  for index, _ := range list {}