incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gord Tanner <g...@tinyhippos.com>
Subject Re: sweet.js and TypeScript
Date Mon, 22 Oct 2012 14:04:26 GMT
Yes, the TypeScript comment was trolling ;)

My main idea with sweet.js would be to replace a couple of the build time
transforms we already do in cordova.js:

module.exports = {
};

to

define("filename", function (require, define, module) {
    module.exports = {
    };
};

as well as the version number updating.

It is just a thought but would be nice to use macros to handle those
transforms and maybe start adding some ES Harmony style macro's to
cordova.js (Just for our code, not leaking into user code yet).

for example:

var foo = {func: (a) => { return a + 1; }};

On Mon, Oct 22, 2012 at 8:14 AM, Patrick Mueller <pmuellr@gmail.com> wrote:

> There was some chit-chat on Twitter this weekend about using the sweet.js
> [1] macro processor in Cordova.  Somehow.  Not quite sure how.  Also, a - I
> believe trolling - mention of using TypeScript [2].  Somehow.
>
> I'd be interested in hearing more about either.
>
> w/r/t TypeScript - note that Isaac Schlueter has mentioned using TypeScript
> with node.js [3]:
>
>     "It’d be a great idea to write up a TypeScript header file
>     for the API surface in Node. Then, we could automatically
>     test for API deviations, validate and flesh out our
>     documentation, etc. Static typing does confer some very
>     relevant value."
>
> I spent a frustrating couple of hours writing code with TypeScript - didn't
> come away impressed; but as an interface definition language - maybe. Not
> sure what the reflective capabilities are there in terms of the output tho.
>
> [1] http://sweetjs.org/
> [2] http://www.typescriptlang.org/
> [3] http://blog.izs.me/post/32697104162/thoughts-on-typescript
>
> --
> Patrick Mueller
> http://muellerware.org
>



-- 
Gord Tanner
Senior Developer / Code Poet
tinyHippos Inc.
@tinyhippos

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message