I don't believe that the growing scheme of ignoring the file system, especially on mobile devices, and in some cases even forcing you to use cloud storage (to share data between apps, for instance) is an effective solution in the short-term.
266 karma · joined September 12, 2011
https://ianobermiller.com
I don't believe that the growing scheme of ignoring the file system, especially on mobile devices, and in some cases even forcing you to use cloud storage (to share data between apps, for instance) is an effective solution in the short-term.
I have more than a sneaking suspicion that this project is essentially a proof-of-concept, and that it is not heavily used at Microsoft.
My team has been dogfooding TypeScript for several months now, providing lots of feedback and writing > 30,000 lines of code (in many cases the new TypeScript code is shorter than the original Javascript). NOTE: TypeScript currently doesn’t support Generics, but we expect to include them in the
final language. Since TypeScript’s static type system has no run-time manifestation, Generics
will be based on “type erasure” and intended purely as a conduit for expressing parametric type
relationships in interfaces, classes, and function signatures.
[1] http://go.microsoft.com/fwlink/?LinkId=267121 TypeScript implements modules that are closely aligned with those proposed for
ECMAScript 6 and supports code generation targeting CommonJS and AMD module systems.
It also looks like you can consume CommonJS and AMD modules using familiar constructs.Per the spec [1]:
TypeScript syntax includes several proposed features of Ecmascript 6 (ES6), including classes and modules.
[1] http://go.microsoft.com/fwlink/?LinkId=267121It should be pretty straightforward to provide Underscore bindings for TypeScript.
One big difference in the library I was working on is that it is lazy, and modeled after .NETs IEnumerable. Whether this is a good thing or not, I'm not yet sure.
var s = 'foo';
var l = s['length'];
// type of l is `string`
I also agree about non-nullable types, and I've found even with TypeScript, having to make sure your vars are defined and not-null is still a pain.Detecting null expressions at compile time might help. There are "nullable" types, but afaik only in signatures:
foo(x?) {
alert(x);
}
If `x` is not passed in, it will be `undefined`.In the interim, a simple library like underscore is quite succinct:
_.map([1,2,3], n => n * n)
With more library support you could even do infinite lists with something like this: _.generate(index => 1.0 / index); from([1,2,3]).select(n => n * n).where(n >=2).toArray()
which outputs [4, 9]
Hoping to open source it soon.Edit: typo, n * 2 should have been n * n, sorry for the confusion
1. Lambdas (as you mentioned) are not only shortened syntax, but also capture the `this` variable automatically for you. Try typing in the following at the playground in the body of the `greet` method to see what I mean (http://typescriptlang.org/playground):
var x = a => this.greet();
2. Classes with inheritance are a big one, implemented using the IIFE pattern as well, with support for static and class members.3. Interfaces with duck typing are very lightweight and easy to use:
interface IGreeter { greet(); }
class Greeter /* implements IGreeter */ {
greet() { ... };
}
4. Extensive type inference. In the following example, the function greet will be typed () => string: class Greet {
greet(x: number) {
var s = ' greetings';
return x + s;
}
}
Static and member vars, return types, local variables, all are type inferred.5. Javascript is TypeScript, just without typing, so converting your codebase is instance, and then you can begin adding type annotations to get more robust checking
It will be interesting to see how the Windows Phone 8 devices are distributed, as the previous deal for 7 was a free device only if you sign up for a 2-year contract.
Unfortunately I just moved teams, so I was in the process of ordering a new machine anyway; but still, a new Surface tablet will be awesome.
The healthcare changes are most upsetting to myself and my wife, especially since we always looked at healthcare as an amazing benefit and competitive advantage to Microsoft. For anyone who doesn't know, there is currently a healthcare plan available that basically covers everything, all the time, with no out-of-pocket costs ever. No copays, no prescription costs, nothing. Of course there are limits, but for many typically cases, like myself, I never pay anything. This plan is going away in 2013 and being replaced by a more typically, less comprehensive option.
Recently though I've taken to some free options (I'm on Windows mainly):
1. Inkscape for all vectors
2. Paint.NET for everything else
3. PNGGauntlet for optimization (mashup of PNGOUT, DeflOpt, and OptiPNG).
4. http://instantsprite.com/ for sprites