Earlier quoted context omitted.
WASM doesn't have DOM access or GC. It's not the answer.
Is that correct? WASM has no DOM access? (I'm asking, not advocating anything.) How does code that runs in a browser do UI I/O without DOM access? Is the intent that you go on writing all of your I/O and DOM-manipulating code with JavaScript and call WASM-implemented helper functions from JS code?
If TypeScript is so great, how come all notable ReactJS projects use Babel?
191–200 of 247 posts
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#192Earlier quoted context omitted.
I started off with C/C++, Java, then AS3 writing Flash games. Then js/jquery and I instantly hated it (js). There were just too many quirks, bizarre, unexpected behavior. Sure, I could learn it inside out and avoid these pitfalls, but why would I when there were better alternatives? I did use CoffeeScript after that, a beautiful little language, but only suitable for smallish projects. I need static typing for large…
Excellent, appreciate this thoughtful answer. So you mostly code games?
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#193Earlier quoted context omitted.
> I do TypeScript every day for work, and honestly I don't see the point of it. really? I'm assuming you never refactor anything.
Perhaps menu-driven refactoring is overrated? (much like IDE generated getter/setter code, which is solving the wrong problem)
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#194Earlier quoted context omitted.
Happy Dart programmer here. Great, easy to learn, productive language that runs on browser, server, mobile. I have no idea why Dart isn't used more.
Any tips on using Dart with mobile from Windows? I only need to target Android, not iOS. I haven't touched Dart for over a year, but the Flutter page seems like it is on HTML, not native, and it only specifies Linux or OS X dev machine.
https://docs.google.com/presentation/d/1cw7A4HbvM_Abv320rVgP...
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#195Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#196Earlier quoted context omitted.
> It would only increase the concept count in an educational setting where you want to only show the thing you're trying to explain. As someone who has written a long tutorial, this makes total sense. When I was first looking at the react ecosystem, it was very frustrating because of the high cost of picking pieces to work together. I really liked http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial... becaus…
This is basically my frustration with the whole trend toward smaller pieces over big monoliths. I don't need a best-in-class every tiny little thing; I just want reasonable tools I can expect to work together well.
More people should consider using Angular 2 for some kinds of projects.
Now, I have professional projects in both Angular 2 and React/Redux ecosystems, and frankly I enjoy using React a lot more in projects where I can focus on the frontend. I moved some projects to isomorphic React (ie, render using React on backend) in Node.js and Rails apps, and thoroughly enjoyed that experience. I keep on top of Elm and omnext and so forth, and I have personal projects built with those, and I do experiments with completely unidirectional dataflow in Elm using an Elixir backend ...
However.
Twice recently, when I had a full-stack project with a relatively short timeline, I made a conscious decision to keep the frontend from getting too uppity and absorbing too much of my mental energy.
In those cases, I used Angular 2, generated from the ng2 CLI.
It's worked pretty well. Well, the first one had some dependency issues from time to time, which is understandable because of the beta -> rc1 -> rcX -> Angular2 release process that was happening.
Why ng2? Well ... not because I'm convinced that it's "the best" in any particular dimension. Its special sauce is supposed to be Zones, which make knowing when side-effects have occurred less something that we have to track and manage manually, but there's other work in that problem space!
I used it because it's an opinionated stack that already has the important pieces in place (router, DI, build/minify, type checking, components), and more importantly, because I can be fairly confident that another dev could get up to speed quickly due to decent docs and guides ... and it's less easy for someone to "paint themselves into a corner" by doing things really wrong.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#197I've been using React + Redux + Typescript stack and I've been quite happy with it (It's hard for me to image how you could do big refactoring without TS). The fact that components props are verified by compiler instantly when I type is a big win. I believe with PropTypes you can't specifically describe what is the shape of your data, for example object with property of such name and the value of this property is obj…
Agreed! There's an open issue that addresses that scenario (and a ton of others):
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#198And it's even stranger applied to Typescript, which is a fairly good implementation of a real-world gradual typing system.
Most modern type systems are quite good at giving you info about problems, blocking errors about the outright incorrect stuff, and otherwise get out of your way. Typescript is no different in this.
But many people (including the top reply) argue like secretly it's 2007 and we're talking about inscrutable C++ compiler errors from the last generation g++ compiler. We're not. Typescript is not only fast and friendly, but it's a heck of a lot more "batteries included" than Babel.
The funniest part is that ultimately flow desires to asymptotically approach what TypeScript already (for the most part) _is_ today.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#199I do TypeScript every day for work, and honestly I don't see the point of it. I'm also of the opinion that the iterator pattern nonsense has ruined generated code quality for ES6 transpilers, and that ES5 getters and setters have made it considerably harder for JS engines to do high level optimizations (dead store elimination, invariant hoisting, load merging, etc.). The sky is falling. Anyway, you're not going to di…
> I do TypeScript every day for work, and honestly I don't see the point of it. really? I'm assuming you never refactor anything.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#200Earlier quoted context omitted.
I can't find in the documentation, does the `pub build` tool do code splitting? I can't use a language without this.
Sorry for my ignorance, but does that amount to loading a library on demand? If so, yes, Dart can do this: import 'package:deferred/hello.dart' deferred as hello; // When you need the library, invoke loadLibrary() using the library’s identifier. greet() async { await hello.loadLibrary(); hello.printGreeting(); }