Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Language is part of the tooling. For example, if you have a language that compiles to js which always passes JSLint, then you don't need JSLint any more. Removing the need of a tool is even better than developing a tool.

CoffeeScript generates less code than Dart, it runs faster thus has its strength in scaling.

In fact, you can already do operator overloading in Javascript using valueOf and side effects. It's a bit tricky though. The Dart approach of operator overloading works more sanely.

If two languages compile to the same runtime (Javascript). Syntax is the only thing we can compare. Many so called "syntactic sugar" do fix design problems of Javascript, please don't ignore them.



> [JS generated from CS] runs faster [than JS generated from Dart]

There are cases where output from dart2js outperforms handwritten JS. Nowadays, the performance of the generated JS is generally pretty good.

> it runs faster thus has its strength in scaling

"Scaling" as in: more developers, more files, more lines of code. Bigger projects.

CS doesn't help with that one bit. It's just as difficult to handle as JS. This is why Google came up with stuff like the Closure Compiler, GWT, and now Dart.

> Syntax is the only thing we can compare.

There are also semantics and the whole environment. Syntax is a small fairly unimportant detail.


> "Scaling" as in: more developers, more files, more lines of code. Bigger projects. CS doesn't help with that one bit. It's just as difficult to handle as JS.

Right, and that's why we have modular design patterns that use the single responsibility principle, and AMDs like Require.js or CommonJS. It's testable, maintainable, can support a large codebase with multiple developers, and doesn't need static typing or other features from TS/Dart.


> AMDs like Require.js or CommonJS

That stuff is terrible to use. There is quite a bit of boiler plate involved and there is lots of overhead in general.

Secondly, there are about 10 somewhat popular module formats and they aren't compatible which each other.

I rather do this stuff declaratively. If it's baked into the language, your tools will understand what's going on and there also won't be any compatibility issues. Naturally, it's also way more convenient to use. You just import something. Done.

> doesn't need static typing or other features from TS/Dart

You also don't need a seat belt or airbags. If you don't make any mistakes, you'll be fine.

However, from a pragmatic point of view, these static checks are very handy. If you rewrite some parts of your code, the analyzer will tell you if you screwed something obviously up. It catches all the stupid mistakes, which means you can fully focus on the logical ones.

With JavaScript/Python/etc you have to run the code and actually hit that particular branch to trigger some sort of error/exception which will eventually help you to identify the actual issue.

You should just give it a try. Try any language/IDE combination which offers good tooling. Tooling can remove a lot of friction. There really is a point to all of this.


Don't get me wrong, I agree that the overall experience is important - the best language in the world would be shit if you had to use notepad.exe to develop in it.

You like your IDEs and static typing and tooling, and it works for you (and for many others). I like my CoffeeScript, my AMD/CJS modules, and testing, and it works for me (and for many others).

Your experiences and assertions are wildly different than mine. I've never found AMD modules a problem. I have found overwrought and verbose code to be a problem. File headers? Interfaces? Java-style OOP in my JS? No thanks.

I think we're both just stating subjective opinions without substantiation, so I'm done here.


> File headers?

No.

> Interfaces?

Implicit interfaces. It's kinda handy.

> Java-style OOP in my JS?

I'm not sure what qualifies as "Java-style" OOP. Is the stuff from ES7 also "Java-style"? How about the stuff from CS?

Well, you don't have to use classes. You can do everything with functions if you want.

> I think we're both just stating subjective opinions [...]

The difference is that I actually tried it.


So have I, chief.

I've used heavy IDEs before with Java, and I much prefer a simpler text editor like Vim or Sublime. I tried out TS a while back. All the examples I've seen were overweight, much like classical enterprise Java. Too much cruft.

Anyway, enjoy TS.


> heavy IDEs

If your machine has 6+ GB of RAM, it doesn't really matter if some IDE uses like half a gig of that. I mean, that's why you bought all that RAM in the first place, isn't it? The point was to use it, right?

Same deal with all those beefy cores. Giving one of them a little bit of work won't hurt one bit.

The only actual downside is that start up takes quite a bit longer than 100msec. However, if you're using it all day, it doesn't really matter if it took 15s to start, does it?

I believe that one should automate as much as possible. Offloading as much brain-dead repetitive work as possible to machines is always a good idea.

So, check if I use the right kind of arguments. Check if that thing has that field or method. Tell me if there are any methods which start with "foo" and if so, tell me their exact names, arguments, and return values. Tell me if the change I just did broke something.

That's the nice thing about machines. They will happily do this stuff over and over again, a thousand times a second. They'll never get tried of it. They'll never complain.

One thing I really dislike about JS is having to check documentation. If you want to use some library/plugin/whatever, you always have to go to its website, navigate to the docs, and then navigate to the specific section. Just to look up the arguments or the names/types of that config object you have to pass to that function.

It's so much nicer and also way faster to do that kind of thing directly in the IDE.

> enjoy TS

I use Dart. And yes, I do enjoy it. It's very pleasant to use.


You "scaling" is just a syntactic sugar to the underlying package/module solution. In js/coffee the syntax just don't care about it, and you use package/module with a library.

Most of the semantics or environment stuff are translated into function calls at last. Then the difference becomes the syntax again: how to use that function? Call it directly or translate a syntax?

I like coffee because it is practical scripting: Need code completion? Don't repeat yourself. Can't code without IDE? Make the language easier to use then you ain't gonna need it. Some people just can't believe a language can be that good without IDE, but remember: you interact with IDE through a language on keyboard/mouse too.




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

Search: