Domain: typescriptlang.org
Stories and comments across the archive that link to typescriptlang.org.
Comments · 10
-
Re:We need something...
Doesn't sound like it. I'm not as familiar with Ceylon, but glancing over it, it looks like another statically typed language that can also compile to JavaScript. The OP sounds like he just wants JavaScript with the niceties that we expect from a modern language. One example would be TypeScript, a superset of JavaScript that compiles down to standard js.
-
Re:C# and VS are obviously linked
If you're doing Javascript in Visual Studio, then you have no excuse not to check out TypeScript. Likewise, in IDEA, you should check out Scala.js. It's surprisingly mature for something that just got off the ground. Javascript needs to die.
-
kinda like typescript to javascript
Hack is to PHP as Typescript is to Javascript?
-
Re:jscript
You might want to look at TypeScript if you're already using Visual Studio. It infers types, type checks your code, is open source, and supports writing plain JavaScript. When using Visual Studio, you can do the things you're used to doing like "go to definition" and "find all references". If you decide to annotate your definitions with types, it can do type checking and catch errors which is really useful when you need to refactor a lot of code. The video at the bottom of http://www.typescriptlang.org/ is a really good tutorial. It compiles to JavaScript and accepts plain JavaScript so you can use it without having to rewrite all your code.
-
Re:better than javascript?
Fortunately for Google, MS couldn't stop them from creating a plug-in to implement Dart, a la ActiveX. MS has a superset of Javascript called TypeScript and it's free and open: http://www.typescriptlang.org/
-
Re:Understanding Dart's goals
I actually have taken a liking to TypeScript for that purpose. It is rather fancy. I never touch "raw" js any more, I just treat it as a compiled blackbox.
-
Re:Still broken
What interpreted language does have static typing?.
These came to my mind:
* Dart has an interpreter and supports both dynamic and static typing
* Pike has an interpreter that supports both dynamic and static typing
* TypeScript is a typed superset of JavaScript that supports dynamic typing, but is first compiled into JavaScriptThe first two fulfil your requirement. The last one doesn't, but is nevertheless an interesting approach.
-
Re:Very Different
don't forget typescript http://www.typescriptlang.org/
-
Re:Remember the old addage
> My bad on JScript, I was unaware of this. You have caught my in my first error - the name of a product.
Bro, this is a fundamental fail. At least you can admit you were wrong. Here, I'll do the same. I txted my bro and and he is a bit fuzzy (20 years ago) but thinks it was kernel 0.12. We're both old timers, so your initial statement of be being in "diapers" ("nappies" they are called in my part of the world) was your attempt to circumvent debate but was incorrect. Incidentally, your "Yes, you are a dumb little liar, are you not?" statement is another fail. Completely unnecessary and uncivilized. It is ok for people to be wrong (as you point out), your behaviour is not ok on a public forum no matter how wrong you think I might be. In this case, you learned something about your bread and butter trade. In contrast, I knew you were wrong about JScript yet did I pillory you for it? No, I tried to be patient and get citations for you and convince you through reason rather than insults.With regard to TypeScript, I have been to http://www.typescriptlang.org/ and http://typescript.codeplex.com/ and noticed out of the 37k page views and 14k+ visitors there have been 236 downloads. Looks like they're on to a winner there.I better bet my business on it quick.. With regard to your crew (oh, I hope you treat them well), yes learning ECMA script 6 is worthwhile. Although as Henry Ford famously said, "If I had asked people what they wanted, they would have said faster horses.". IMHO (and it is my opinion), you'd be better off training them to use GWT or vaadin or Script# or something like that. As is often said on the interweb, developing in JavaScript (and TypeScript) is analogous to developing in assembler. Yes you can do cool things, but by focussing on that you are missing out on the important big picture.
By all means, bet your business on TypeScript. Hopefully you will be a success (and all that TypeScript is still useable, if only the JavaScript is usable then why bother with the TypeScript extensions at all? why not just stick with your JS?). Meanwhile I'll still be recommending GWT and vaadin for higher productivity and great interactivity and a big ecosystem.
-
Re:Full classes?
Doesn't JavaScript have a better system altogether? Prototypical inheritance? Classes feel awful in comparison.
These classes are just syntactic sugar, and are fully defined in terms of prototypes and constructor functions. The exact translation is detailed in the language spec, but it's easier to just go here and see how exactly it maps TS code to JS code, live, as you type it. Here's a simple example with inheritance
class Base {
x: number;
constructor(x: number) { this.x = x; }
foo() { return this.x; }
}
class Derived extends Base {
foo() { return super.foo() }
}translates as follows:
var __extends = this.__extends || function (d, b) {
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
}
var Base = (function () {
function Base(x) {
this.x = x;
}
Base.prototype.foo = function () {
return this.x;
};
return Base;
})();
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
_super.apply(this, arguments);
}
Derived.prototype.foo = function () {
return _super.prototype.foo.call(this);
};
return Derived;
})(Base);As you can see, it's all fairly idiomatic JS.
Furthermore:
And doesn't the next revision have support for classes? I keep forgetting the name of it, H s... oh Harmony?
I'm sure Harmony has a lot of things planned to extend the language massively to bring it up to standards even comparable to other languages.Indeed it does, and TypeScript classes are directly borrowed from there. Furthermore, the team has said that they will keep tracking ES6 (since it's still a draft), and amending TS accordingly so that their class syntax and semantics remain in sync.