Hi Lionel

On 18/12/12 01:41, Lionel Orry wrote:
> A small question, out of curiosity, what made you choose Typescript ?
> Did you consider other structured alternatives (coffeescript, etc)? What
> were your conclusions?

In terms of implementation, I wanted to implement a lightweight
readable text markup that would run in the browser or on the server
with a straight-forward consistent syntax -- I was striving for
simplicity both in the language and in the generated HTML.

So, the target language had to be JavaScript.  I'd written quite a bit
of code in JavaScript and more recently CoffeeScript, also written
some code in Dart and a little TypeScript. JavaScript is a wonderfully
elegant language but it's dressed quite badly and it doesn't have
structuring mechanisms for programming in the large or writing
maintainable code (this is addressed eloquently in Anders Hejlsberg's
TypeScript introduction
http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript).

CoffeeScript dresses JavaScript in a beautiful new set of clothes but
doesn't address the problem of programming in the large, at heart it's
a scripting language like JavaScript.

Dart is nice, but it's an all or nothing proposition and I don't think
it will escape the gravitational pull of JavaScript.

In a nutshell TypeScript fixes JavaScript's scalability problems
without changing the underlying language or forcing you to ditch the
(huge and vibrant) JavaScript ecosystem. Even for a small program like
Rimu, TypeScript made it much easier to structure my code  (and my
thoughts) and the type system saved me from lots of subtle (and not so
subtle bugs) along the way.

Don't confuse TypeScript's (and Dart's) type annotation systems with
traditional static language typing (a la JavaScript), the underlying
dynamic language is unchanged but you have:

- A compile-time mechanism for optionally documenting and imposing
  your intent (think integrated JSDoc).
- A mechanism for tooling IDEs (think Intellisense).

I don't normally use an IDE for writing my own code, but they're
hugely useful for maintaining and reading large code bases written by
others (which is the core of commercial software development).

You may have noticed that the test suite and the rimuc tool were
written in plain JavaScript, both are trivial stand-alone scripts and
I decided they didn't merit a make/compile infrastructure (horses for
courses).

Conclusion: I can wholeheartedly recommend TypeScript if you need to
write programs that target JavaScript (in hindsight there is no way I
would want to have written Rimu in raw JavaScript).


Cheers, Stuart

> 
> On Tuesday, December 11, 2012 6:46:15 AM UTC+1, Stuart Rackham wrote:
> 
>     Greetings All
> 
>     With the recent discussion regards AsciiDoc ports and features I
>     thought this would be a good time to release Rimu.
> 
>     Rimu is a readable text to HTML markup language inspired by AsciiDoc
>     and Markdown, it borrows from both and adds some features of it's own.
> 
>     Rimu is designed for and only generates HTML, so it doesn't compete
>     directly with AsciiDoc. In terms of application domain it's closer to
>     Markdown.
> 
>     The implementation is very light, <14KB of minified JavaScript
>     (compiled TypeScript).
> 
>     You can read the documentation and experiment with Rimu in the Rimu
>     Playground: http://www.methods.co.nz/rimu/rimuplayground.html
>     <http://www.methods.co.nz/rimu/rimuplayground.html>
> 
>     The source is on Github: https://github.com/srackham/rimu
>     <https://github.com/srackham/rimu>
> 
>     You can also install Rimu as a Node.js module (includes the `rimuc`
>     command-line tool, run `rimuc --help`):
> 
>         npm install rimu
> 
> 
>     Cheers, Stuart
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/w97NntC4cYoJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to