5 ms·
I'm curious. A question for the author: What is it that you're aiming to improve over Vue + Typescript? Vue is opinionated and comes with single file componen
by AndrewSChapman 7y ago
I'm curious. A question for the author: What is it that you're aiming to improve over Vue + Typescript? Vue is opinionated and comes with single file components, a router, a store etc.
- iudqnolq 7y agoI've been wishing for a clean way to write a render function using JSX for every Vue component. Once I tried out React I fell in love with using ordinary JavaScript array methods instead of v-for directives and so on. (I'm a student, hate webpack, and don't want to learn it's nuances for a few years. I know from googling this can be done with sufficient webpack config).
- gdotdesign 7y agoWhat I am aiming for is to move away from writing JavaScript or minimize it to the level where it's more controllable. I've come from Elm where it is done in a very good way, but it's too restrictive, and I like react and it's expressiveness so I wanted to combine the two. Vue is really good but at the end you are still writing JavaScript which is really hard to do in a safe way. And from my experience Typescript isn't 100% safe as well.
- a_wild_dandan 7y ago> What I am aiming for is to move away from writing JavaScript or minimize it to the level where it's more controllable. Why is this a goal? Could you elaborate? > And from my experience Typescript isn't 100% safe as well. Does it need to be? In my experience, enforcing reasonable standards (don't allow escape hatches like the `any` type, or the `// @ts-ignore` comment band-aid) fosters pretty strong interfaces. I haven't really needed more from the type system. Has your experience been different?
- allover 7y agoI don't think there's any need to sealion the author on this. To your first question: JS's warts are well understood. You must already acknowledge this if you're a TS fan. To your second: TS isn't 'actually' safe, to the extent something like Elm is (i.e. very small chance of runtime errors). This is also no secret - there are lots of examples out there if you care to search for them.
- hellofunk 7y agoJS is on an extreme end of the spectrum of language inconsistencies, and a lot of developers with extensive experience in other languages strongly prefer not to use it. That's partly why there are so many languages that transpile to JS so you don't have to suffer though actually writing it. Further, UI development is an area where things can get messy very quickly. "Safe" languages often greatly minimize the kinds of bugs that are very easy to write in JS. This is one reason why Elm and Clojurescript have had years of adoption -- they by default make values immutable (and their entire programming paradigm doesn't actually require mutating most values ever) which removes a large class of common UI errors. There are other benefits as well.
- pkilgore 7y agoYou should checkout ReasonML!