5 ms·
In that case it's no different from Rust, Rust has a GC option (ref counting). It's limited and opt-in then you still carry the cognitive burden of memory manag
by littlestymaar 9y ago
In that case it's no different from Rust, Rust has a GC option (ref counting). It's limited and opt-in then you still carry the cognitive burden of memory management, you have to think when to use it. But if you need that level of control, you'll need to think about memory anyway.
And in my experience, it's way easier to reason about allocations in Rust that it is in Java (automatic type erasure if you want to use generic code) or Go (how will escape analysis behave in that case ?) for example. Rust traits are way better than C++ interfaces in that regard also.
- pjmlp 9y agoJava and Go are just two examples, and surely not those that I had in mind. Rather languages in the Oberon and Modula family, D, Nim, Eiffel, C# as of 7.2, Common Lisp, and a few MLs. If you do RC everywhere, using library types, it is slower than a tracing GC, and still not as productive.
- seanmcdirmid 9y agoUWP has ref counting, garbage collection (via C#), and stack allocation. It does native compilation to boot, unfortunately it isn’t quite universal.
- pjmlp 9y agoAnd is built on an improved COM, thus requiring first class support for it, by any language targeting UWP.
- seanmcdirmid 9y agoYa, that’s right. But I think this is only C++ and C# at the moment.
- pjmlp 9y agoJavaScript on Chackra's engine, VB.NET, C# and C++. F# support is still to be done, due to how .NET Native handles MSIL. Borland was in the process of doing it for Delphi and C++ Builder, but I don't know the current state. Originally they were only replicating the Metro UI, back on Windows 8.
- trumpsamerica 9y agoIsn't it universal windows? :)
- Narishma 9y agoYes, runs universally on all Windows 10 versions.