@Ray7: Except Typescript is not the same idea as CoffeeScript or Kotlin!
CoffeeScript and Kotlin are new languages, while TypeScript is a language extension; that's why it's different from previous attempts.
Herbie
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
@Ray7: Except Typescript is not the same idea as CoffeeScript or Kotlin!
CoffeeScript and Kotlin are new languages, while TypeScript is a language extension; that's why it's different from previous attempts.
Herbie
3 hours ago, Dr Herbie wrote
@Ray7: Except Typescript is not the same idea as CoffeeScript or Kotlin!
CoffeeScript and Kotlin are new languages, while TypeScript is a language extension; that's why it's different from previous attempts.
Herbie
Ah, I see. So there's the 'familiarity' thing ...
Verrry interesting ....
@Ray7: Also, you can rename your existing JavaScript files to a TS extension and hey-presto, they're valid as Typescript; easy transition is important when there is a whole world of JavaScript already out there -- nobody is likely to throw away an entire site's worth of JavaScript and rewrite in CoffeeScript, but they might rename some files and run it through the TypeScript compiler as a starting point ...
Herbie
19 minutes ago, Dr Herbie wrote
@Ray7: Also, you can rename your existing JavaScript files to a TS extension and hey-presto, they're valid as Typescript; easy transition is important when there is a whole world of JavaScript already out there -- nobody is likely to throw away an entire site's worth of JavaScript and rewrite in CoffeeScript, but they might rename some files and run it through the TypeScript compiler as a starting point ...
Herbie
Okay, how does the compiler work? It says that it runs on any OS anywhere, yes? So I don't need VS to compile this?
@Ray7: That's where my knowledge ends, unfortunately. I've been reading about it, but haven't used it yet.
The http://www.typescriptlang.org/ page states that the compiler can be used in any JavaScript host, but the details are a bit thin.
Herbie
Okay, they missed a trick here.
function greeter(person : Person) {
return "Hello, " + person.firstname + " " + person.lastname;
}
What's wrong with this?
function greeter(person : Person) {
return "Hello, ${person.firstname} ${person.lastname)";
}
8 hours ago, kettch wrote
@DeathByVisualStudio: They are the most upfront about what they are doing. Companies like Google and Apple seem to be hiding behind the FOSS banner and using it for their own purposes, but don't seem to give back as much as they take.
Microsoft doesn't use any FOSS in their products, but gives a whole lot to the community. They aren't even pushing their own branded licenses any more and are instead using licenses that are more palatable to the FOSS fanbois.
Hmmm... I'd agree about Apple; can't think of anything they've contributed. Maybe bug fixes to webkit, mach? Google on the other-hand does plenty...open source Android for starters. If anything they endorse and legitimize FOSS projects much like Microsoft does. I'm also glad Google battled Oracle over java to keep Oracle from locking that beast down and trying to monetize it.
I just wish people would stop polarizing around specific tech or companies. It's one thing to say something or someone sucks; it's an entirely different thing to take up the life long cause of being an apologist for a given tech or company. That's just a general statement and not directed at you or anyone. Being an apologist, fanboi, or otherwise removes critical thinking from the equation and limits growth.
9 minutes ago, Dr Herbie wrote
@Ray7: That's where my knowledge ends, unfortunately. I've been reading about it, but haven't used it yet.
The http://www.typescriptlang.org/ page states that the compiler can be used in any JavaScript host, but the details are a bit thin.
Herbie
Yes, that's the bit that I'm missing. It seems to have something to with Node.js but I can't quite make the connection.
23 seconds ago, DeathBy​VisualStudio wrote
*snip*
Hmmm... I'd agree about Apple; can't think of anything they've contributed. Maybe bug fixes to webkit, mach? Google on the other-hand does plenty...open source Android for starters.
Seriously?
http://www.zdnet.com/blog/btl/report-open-source-android-mobile-platform-not-very-open-at-all/54085
Most commercial companies support open source up to a point. The 'point' is where it starts to impact their profits.
I just wish people would stop polarizing around specific tech or companies. It's one thing to say something or someone sucks; it's an entirely different thing to take up the life long cause of being an apologist for a given tech or company. That's just a general statement and not directed at you or anyone. Being an apologist, fanboi, or otherwise removes critical thinking from the equation and limits growth.
In my experience, those who label others as 'apologists' and/or 'fanbois' are usually both.
I'm not sure if this is the case, but if they aim to be a compatible superset of JavaScript (and from the renaming stuff Herbie has been mentioning it sounds like they do) that would break any regular JavaScript code that happens to include stuff like that in a string.
And I'm not sure there's really a need for a 'new' keyword here.
var user = new Student("Jane", "M.", "User");
Do we really need a constructor? Why not just a member function to set the values?
2 minutes ago, Sven Groot wrote
*snip*
I'm not sure if this is the case, but if they aim to be a compatible superset of JavaScript (and from the renaming stuff Herbie has been mentioning it sounds like they do) that would break any regular JavaScript code that happens to include stuff like that in a string.
Mmmm. Yes, that makes a lot of sense,
I guess that is the problem if you're aiming to extend rather than come up with a new language. Fairynuff.
@Ray7:
Have you watched the C9 video yet? Because that explained about everything. For example, the new constructor is mapped to the JS pattern that defines constructor. If you don't want to do that, you can use method for that. But you need to think about Type. Meaning, you can pass in a Object that has specific student attributes, but, you cannot say obj.SetSrudentAttrributes().
You don't need to rewrite the source, but, you need to give a type declaration xx.d.ts file. So TS would know know it is not ANY yet. If you pass in pure JS, the type is ANY, which I dont know how the IDE deal with it. Probably in the same video that I need to rewatch.
What trick?
What's wrong with this?
function greeter(person : Person) {return "Hello, ${person.firstname} ${person.lastname)";}
There's nothing syntactically wrong with it. It returns a string literal.
55 minutes ago, Ray7 wrote
And I'm not sure there's really a need for a 'new' keyword here.
*snip*
Do we really need a constructor? Why not just a member function to set the values?
Can you prevent a member function from being called more than once on the same instance?
Ray7: tsc can simply compile itself to JS file, so you can use it as embedded scripting precompiler, which exposes everything useful for you too, types "reflections", refactorings, code analysis, syntax coloring, etc ... its pure-JS, thats the trick
, no VS needed, no node.js needed ...........
Ray7: and as probably biggest TS project now, tsc source code in few .ts files is really very good start to analyze tooling features support using VS2012 plugin, to try to understand how it works. Already this is pure beauty, you have open compiler interface at aour fingertips, you can skip to definitions, find references, simply everything you do to figure out how yet unknown code works; so good to learn how much MS eats own dog food (not foot:-)) here ![]()
Add your 2¢