5 ms·
I don't get the push for rust as a front-end language, it's very distracting with a lot of low-level features. Can we just stick with "best tool for the job"?
by nsonha 5y ago
I don't get the push for rust as a front-end language, it's very distracting with a lot of low-level features.
Can we just stick with "best tool for the job"?
Rust for performance-critical systems and, say, typescript for front-end? Using a single language for everything is a wet dream that always ends up in complexity and more work as you're fighting the "native" ecosystem.
- VWWHFSfQ 5y agowhat if I don't like typescript
- nim2020 5y agoyou can write your frontend in whatever you want, for example using yew...
- twobitshifter 5y agoDon’t use a web based app stack?
- nsonha 5y agoI don't know, pick a better high level language: kotlin, swift, f#
- deleted 5y ago[deleted]
- whimsicalism 5y agoMaybe you should spend like 5 minutes looking into the thing you're critiquing before critiquing it? Just a suggestion, given that Tauri literally uses typescript for front-end.
- nsonha 5y agodid spend 5 mins, saw absolutely no code so I made some assumption. Maybe they should make better docs that don't require 5 mins+ to figure that out.
- whimsicalism 5y agoOkay, so make a top-level comment critiquing their docs, rather than making an incorrect assumption and then critiquing it. You don't need to offer a perspective on everything, and I prefer the critiques I read to be well-founded.
- adamnemecek 5y agoWhen WASM becomes a dominant platform, all the performance-critical features will become very important.
- abeltensor 5y agoWASN will always need some kind of javascript glue to interact with the DOM.
- adamnemecek 5y agoI think that eventually, people will roll their own GUIs without using DOM.
- parker-codes 5y agoThe paradigm of Tauri is to pick the "best tool for the job". Bring your own frontend tech (JS, TS, RustWasm, etc).
- ironmagma 5y agoNormally I'm on the defensive side for the JS ecosystem on Hacker News, but not today. While it's still the best option for web app development productivity right now, there are woefully bad issues with the Node ecosystem, from poor or lack of documentation for complex build tools to zero contracts between dependencies. Rust has the advantage of being able to break if things seem to not fit together. It's a popular language for more use-cases than just performance-critical applications even if it supports that.
- nsonha 5y ago> zero contracts between dependencies. Isn't typescript contract? This is not really about JS, if I want to replace JS I'll pick a language with similar characteristics that make it successful. Similar to how you replace C++ with rust, another language that gives you control of memory. For app developments they are simplicity and a focus on domain modelling with a good type system (this is typescript teritory), NOT memory safey. And don't tell me that rust's type system is powerful too, yes, but it's also complex and the focus isn't domain modelling. Like C++ and golang's type systems, it's there to aid the compilers/borrow checker, not developers. Example of such language in my other comment: kotlin, F#
- ironmagma 5y agoI think Typescript won't check that two of your dependencies are compatible with each other; it will only check that your app is compatible with dependencies. Even then, the check isn't very strong, since TypeScript operates on a "as you want it" basis, which is nice in some ways but also means you could get overly permissive behavior, especially if you're using third party typings, which is fairly common. > the focus isn't domain modelling, like C++ and golang's type systems Could you please explain what you mean by this? I've honestly not heard this argument before so I'd be interested what domain modeling Rust doesn't encourage/support that, e.g. Go does.
- nsonha 5y agoI'm not saying that go and C++ have better type systems. I'm saying like rust, their type systems are built to aid the compiler. High-level languages like ocaml or f# have type systems made for domain modeling
- jdright 5y agoYou know, there are people like me that just can't stand Javascript. TypeScript is somewhat acceptable, but knowing Rust, I just prefer to use it anyway. It is just better.