Hacker News new | past | comments | ask | show | jobs | submit login

I just wish TS was based on CoffeeScript.



I've often thought about a CoffeeScript variant with optional typing that transpiled to TS. The types would be ascribed via a backslash, e.g. `(hello\string) -> hello + ' world'`. But considering the huge benefit of TS is the tooling such as intellisence, I doubt it's worth the effort to start a whole separate ecosystem.


I envisioned it somewhat the opposite way. Gradual types a-la TS tacked onto CoffeeScript. No actual TS integration per-se.

Though even better would be if the TS team could figure out a way to factor out the type inference logic so that it could be applied just as simply to CoffeeScript as to Javascript, and even allow definitelytyped defs and perhaps intellisense logic to be reused everywhere.

Roslyn does this somewhat for C# and VB, so it might not be too big of a jump.


Contracts.coffee was great but sadly didn't live long. It would be worth reviving if there is an easier way to maintain it alongside mainline (iced) coffeescript.

http://disnetdev.com/contracts.coffee/


Why? Coffeescripts syntax and scoping rules are a barrier to adoption and using ts/js syntax avoids that.


'could be used with' is really what I meant.


Coffeescript was such a pain though, if something you wanted to edit was written in coffeescript, you'd have to learn coffeescript to touch it.

If something is written in typescript it doesn't matter if you don't know it. Just write what you want to change in javascript. All javascript is typescript.


I'd love to know what you love about coffee? Is it the syntax? I am working on extending the Typescript parser to support coffee like syntax.


"Love" is a strong word. The syntax is nicer than JavaScript, and I prefer to use it when possible. Though granted JS is making strides and the difference isn't as great as it was 5 years ago.

You're part of a MS project doing this, or you're doing it on your own?


Doing it on my own. I really like how I can quickly hack with coffee but I also love the typescript intellisense magic so trying to make a hybrid.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: