News for hackers. Stuff that matters.
Re:Why did we choose Rust to develop TiKV? by cyber1 on Wednesday September 27, 2017 @05:53AM (#15346237)
Swift can't replace Rust in system programming domain because he uses ARC for memory management but Rust gives you choices.
Re:Why did we choose Rust to develop TiKV? by zerr on Wednesday September 27, 2017 @06:25AM (#15346375)
I don't think ARC is an issue here - it's just a deterministic reference counting - a la implicit using of smart pointers. Besides, Swift also has some unsafe pointer types as well.
Re:Why did we choose Rust to develop TiKV? by cyber1 on Wednesday September 27, 2017 @06:37AM (#15346425)
Yes, you right according to "deterministic" but you forget about overhead. Rust gives you more safe control on memory management and in most cases, you can always write the fast and efficient safe program without the overhead. Rust give different smart pointers and even sometimes when you 100% understand what are you doing you can use unsafe raw ptr.
Re:Why did we choose Rust to develop TiKV? by zerr on Wednesday September 27, 2017 @06:50AM (#15346476)
Yes, there is a trade-off of course. I think Swift is in the middle on Usability - Safety axis (C++ being on the left and Rust on the right extremes).
Re:Why did we choose Rust to develop TiKV? by imtringued on Wednesday September 27, 2017 @11:39AM (#15348877)
For certain programs a GC can basically make a programming language completely useless (no shared libraries with C abi, no realtime audio, videogames with stutter) regardless how fast the programming language is. This is not the case for swift. It's merely slower than rust.
Re:Why did we choose Rust to develop TiKV? by pjmlp on Wednesday September 27, 2017 @02:18PM (#15350674)
Also to note that Swift has bindings to the 2D, 3D and real time audio APIs on Apple platforms.
Re:Why did we choose Rust to develop TiKV? by pjmlp on Wednesday September 27, 2017 @06:59AM (#15346529)
Apple thinks otherwise on the context of their OSes.
Re:Why did we choose Rust to develop TiKV? by abiox on Wednesday September 27, 2017 @11:40AM (#15348907)
> system programming

worth mentioning that this term has a broader meaning than how some rust evangelists use it.

Re:Why did we choose Rust to develop TiKV? by jdright on Wednesday September 27, 2017 @01:29PM (#15350141)
The Rust "evangelists" version of system is most of the time the broader meaning of it as Rust do not exclude an entire class of systems as some languages out there.
Re:Why did we choose Rust to develop TiKV? by abiox on Wednesday September 27, 2017 @01:51PM (#15350398)
apologies, but i don't quite follow. what do you refer to by 'class of systems'?

one common sentiment promulgated by rust evangelists is, for example, that go is 'not a systems language' because it has a GC. however, this definitional exclusion doesn't seem to align with (evidently broader) historical use of the term 'systems language'.

Re:Why did we choose Rust to develop TiKV? by jdright on Wednesday September 27, 2017 @03:52PM (#15351640)
Real real-time embedded systems, low-level operating system components, etc. are some kind of things that GC languages exclude completely, so by definition, the subset of "system programming" set is eliminated from use with ie. Go but not from Rust. Consequently, Rust has wider class of systems which makes it a true system programming language as C and C++.
Re:Why did we choose Rust to develop TiKV? by abiox on Wednesday September 27, 2017 @04:45PM (#15352151)
"system programming" is not composed entirely of things where GC presents a non-trivial problem.
Re:Why did we choose Rust to develop TiKV? by jdright on Thursday September 28, 2017 @11:13AM (#15357639)
But 100% > 50%.
Re:Why did we choose Rust to develop TiKV? by abiox on Friday September 29, 2017 @02:30AM (#15363206)
i don't quite follow what you're trying to say.
Re:Why did we choose Rust to develop TiKV? by jdright on Friday September 29, 2017 @11:31AM (#15366150)
Simple put: Go ISN'T a true systems programming language because it simple does not work for every and ALL type of systems.

Yes, it may work with some type of systems, but this does not make it a systems language. If you don't want to accept this fact, then you have bigger problems or you reality is narrow.

Maybe this can help you see through your bubble: https://github.com/CppCon/CppCon2017/blob/master/Presentatio...

Re:Why did we choose Rust to develop TiKV? by SAI_Peregrinus on Friday September 29, 2017 @01:55PM (#15367507)
Another way to say it: The set of systems programming tasks for which Rust can be used is a superset of that for which Go can be used. Go cannot be used for real time code, as it does not provide latency guarantees. Go cannot be used for many embedded (microcontroller) systems as the runtime is required.

I've gotten Rust code to run on an ATSAMD21G18 Arm Cortex M0 (Adafruit Feather board). That board has 256K flash and 32K RAM. Go executables can't even fit in the program flash! Considering the sheer number of systems that have microcontrollers in them somewhere it would be very hard to call a language that doesn't support them a "systems" language. Maybe "applications language" would be more appropriate.

Re:Why did we choose Rust to develop TiKV? by abiox on Saturday September 30, 2017 @01:28AM (#15371400)
oh, i see. so you were pointlessly making a some kind of fallacy argument. no "true" systems programming language, indeed.
Re:Why did we choose Rust to develop TiKV? by jdright on Saturday September 30, 2017 @07:42PM (#15375571)
Seriously? Fallacy? That is really not wanting to understand things how they are. You should really go back to textbooks and try to understand hardware.