Angular 2: Built on TypeScript
201–210 of 235 posts
Re: Angular 2: Built on TypeScript
#202Earlier quoted context omitted.
> Typescript is just ECMAScript 6, with type annotations . Then it's not "just ECMAScript 6", is it? Anyway, I'm not saying TypeScript doesn't have merit--in fact, I'm considering using it in my next web app. I'm just saying that using TypeScript is a tradeoff that's not without drawbacks, since you're now dependent on a new set of tools and new additions to the syntax (which means, for instance, that your editor/IDE…
I don't see what the trade-off is. You can just take the transpiling output and go home if you want. Out of all the languages that transpile to JavaScript, Typescript is probably the least risky because it is just JavaScript if you want it to be just JavaScript.
Re: Angular 2: Built on TypeScript
#203Earlier quoted context omitted.
I am pretty sure that TypeScript just adds type safety and is optional. I don't see this as a huge negative and I actually see this as a positive. Just curious, what and why are all your reasons to move away from Angular?
- Not-so-great documentation. - Lengthy learning curve. - Not concerned with performance at all (can be a nightmare on mobile devices with low RAM). - Google's history of throwing away and/or deprecating projects, (see Angular v1). - I still have yet to see a Google website using Angular in any large capacity. - Ecosystem lock-in. It tries to do a LOT of stuff, and you generally need to be doing all these things the…
I would strongly disagree. Watch this link to when Igor talks about Angular performance.
Re: Angular 2: Built on TypeScript
#204If Google is promoting TypeScript, can they still promote Dart? How many alt-javascript's can one company promote?
Not really, no.
...then again, the 'dart community' has diminished to basically nothing, so I doubt many will care particularly.
Re: Angular 2: Built on TypeScript
#205Re: Angular 2: Built on TypeScript
#206Earlier quoted context omitted.
To be fair, JavaScript started out as a language that looks like Java. "JavaScript was designed with Java's syntax and standard library in mind. In particular, all Java keywords were reserved in original JavaScript, JavaScript's standard library follows Java's naming conventions, and JavaScript's Math and Date objects are based on classes from Java 1.0" -- http://en.wikipedia.org/wiki/JavaScript#JavaScript_and_Java
That cherry picking you just made just completely reversed what was actually said in that article: "A common misconception is that JavaScript is similar or closely related to Java. It is true that both have a C-like syntax (the C language being their most immediate common ancestor language). They also are both typically sandboxed (when used inside a browser), and JavaScript was designed with Java's syntax and standar…
He said it looks like Java, I believe. Not "it's similar to Java".
Re: Angular 2: Built on TypeScript
#207Earlier quoted context omitted.
Completely agree 100%. Hopefully Typescript isn't merging any sort of runtime type checking.
I think angular is not after runtime type checking , like the TypeScript compiler. I think what they're after is keeping type information beyond `instanceof`, like keeping information about interfaces and the ability to access type properties beyond `Foo.prototype.bar`. Edit: to clarify, runtime type information should not be used to check for types again , but rather to do things similar to Java's reflection.
var length = rtts.type(name.length, rtts.int);
https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9...
Re: Angular 2: Built on TypeScript
#208Earlier quoted context omitted.
I have specifically avoided angular because I feel like it's a monster in that you are so tied to learning and understanding it's proprietary system. I too have moved directly to react. Can anyone comment on how the skills learned by learning Angular can be applied any where else?
You're 100% right. Once you're in Angular-land you are completely tied to the framework. You don't think about "how can I make X in my domain happen?" you think about "how do I make X in Angular happen". This coupled with the horrific Angular docs make it really tough to justify using from a productivity standpoint. I've moved to React as well and feel it's a 10x boost in productivity because I'm constantly thinking…
Re: Angular 2: Built on TypeScript
#209Earlier quoted context omitted.
I disagree. Typescript is just ECMAScript 6, with type annotations. Most of the differences come from the language changes (ES5 -> ES6), than the superset that Typescript explicitly adds.
> Typescript is just ECMAScript 6, with type annotations . Then it's not "just ECMAScript 6", is it? Anyway, I'm not saying TypeScript doesn't have merit--in fact, I'm considering using it in my next web app. I'm just saying that using TypeScript is a tradeoff that's not without drawbacks, since you're now dependent on a new set of tools and new additions to the syntax (which means, for instance, that your editor/IDE…
It's not "Javascript with a bunch of proprietary extensions", either. Type annotations can't be the difference between understanding code in Typescript if you understand Javascript.
You have a point about tooling, but you would have the same problem if you had a project on visual c++ 6 and upgraded to c++/14, and again, you didn't mention it.
All of this is in spite of the fact that ES6 nearly had optional type annotation in the same syntax that Typescript does, along with many other Javascript derivations that use the same type annotation syntax (Actionscript and Atscript that I know of).
Re: Angular 2: Built on TypeScript
#210Earlier quoted context omitted.
"You have a problem with JavaScript. You rewrite your entire code base in TypeScript. Now you have two problems."
Wrong, JavaScript is valid Typescript, so you don't have to rewrite anything.
http://crystae.net/2015/01/22/typescript-is-not-a-superset-o...
Try running jQuery's source through the TypeScript compiler some time.