Live data from Hacker News

CoffeeScript for TypeScript

civet.dev

51–60 of 143 posts

Re: CoffeeScript for TypeScript

#51
post #45

Hello! I created Civet ask me anything. Or just curse me for keeping the dream of CoffeeScript alive :P

I've got 99 problems but the tersity in TypeScript isn't one of them. Can't wait to groan that a random project we depend on uses this and I have to learn new syntax to make a 1 line change.

Whenever I saw coffeescript I just felt like the developers fancied a change for change sake and doesn't have real problems to solve.

It's clever though to create a new syntax, I'll give you that

Re: CoffeeScript for TypeScript

#52
post #47

"The Modern Way to Write TypeScript." I feel like this is exactly the right kind of slogan for a project like this. Smug and opinionated, disregarding anyone who might not feel the same.

Help me come up with a better slogan and I'll use it.

A Modern Way to Write Javascript?

Re: CoffeeScript for TypeScript

#53
post #47

"The Modern Way to Write TypeScript." I feel like this is exactly the right kind of slogan for a project like this. Smug and opinionated, disregarding anyone who might not feel the same.

Help me come up with a better slogan and I'll use it.

A Great Way to Write TypeScript

A Concise and Powerful Dialect of TypeScript. (my favourite but some might argue that Civet is more than a dialect. I think it's a dialect.)

TypeScript, Streamlined

Write Less, Do More

Expressive Syntax and Faster Coding. (there's already two slogans, and this one is great, plus you don't have to repeat the name of the project in the title section)

Expressive Syntax, Fast Coding. (feels a bit crisper to my ears)

I think there's many ways you can say, "this is an awesome, fast, concise way to write web code that compiles to TS/JS" without suggesting it's _the_ way to write _modern_ TypeScript.

Re: CoffeeScript for TypeScript

#56
Very tastefully done. Every one of these items is a huge improvement. This one in particular drives me crazy: `x.map(($) => $.name)`, `x.map .name` is almost Haskell level terseness.

Can this all not be done as experimental typescript though, rather than a new language?

Re: CoffeeScript for TypeScript

#57
post #47

"The Modern Way to Write TypeScript." I feel like this is exactly the right kind of slogan for a project like this. Smug and opinionated, disregarding anyone who might not feel the same.

Help me come up with a better slogan and I'll use it.

"In my opinion, not to offend, acknowledging diveristy, a modern way he/she/they write typescript"

Re: CoffeeScript for TypeScript

#58
post #23

Not the first time I see the proposed pipe operator syntax but oh my god, did they have to make it so messy? data |> Object.keys |> console.log when you could have done |> data Object.keys console.log Or even better, don't introduce new syntax and just make it a simple function instead |>(data, Object.keys, console.log)) Yes yes, I know "|>" is not a legal variable/function name right now, but also, why not?!

Because that's not how the pipe operator works in any other language.

As someone else, it does in Clojure (which is what I wrote most of the time). But even if it didnt, does it matter? If there is a better way, the way is better, no matter if it exists in other languages or not.

If all languages tried to be the same, most of them would be boring.

Re: CoffeeScript for TypeScript

#59
post #34

Earlier quoted context omitted.

Is it? I find most of the "winning" tech deeply unproductive. Have you tried developing in a project with Webpack and Redux? It's kind of its own little hell. Everything is way too slow and complicated. Tasks that should take 20 minutes take 3 hours.

“Winning tech” may be less productive for a one-off single person project. But “losing tech” is unproductive when you have to maintain/upgrade your code over many years and onboard new developers into the team. It is unfortunate that the tech industry’s choice of tools is largely fashion-driven but that is the reality.

The problem is, the entirety of the javascript ecosystem is built for large teams doing multi-year enterprise projects, and so unless you're launching a social media startup or something, you have to wade through a swamp of unnecessary complexity.

Re: CoffeeScript for TypeScript

#60
post #26

Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity. When I actually tried to write a project in coffee script, the results were the opposite of what I expected. The code was harder to read, harder to modify, harder to understand, harder to reason about. There's something about removing stuff from syntax that makes programm…

I don't know how much you actually tried coffeescript but I find your opinion strange. Coffee wasn't ever like J or anything crazy terse. Its appeal came not merely from making things shorter (it did that, but not by a crazy margin), but from adding a lot of useful things to the language like ? operator, spread operator, destructuring, classes, ranges, better iteration, etc. Almost every coffeescript feature was ultimately added to Javascript (and with very similar syntax) which made coffee somewhat obsolete. Coffee's lack of brackets and semicolons everywhere and @foo instead of this.foo, as well as usage of other features certainly didn't take away any readability or explicitness, if anything - they made it better; the same way those same features make Javascript better and more readable (and, ekhm. "easier to reason about") as long as you _know_ them.
Post reply on HN