10 ms·
I don't understand the trend to move from Coffeescript to ES6. I like both, but I write Coffeescript for its concision. I have no issue compiling Coffeescript
by blitmap 9y ago
I don't understand the trend to move from Coffeescript to ES6. I like both, but I write Coffeescript for its concision. I have no issue compiling Coffeescript to ES6 as a separate build step, but I'm not going to write ES6 myself. That said, I'm sure a project like Decaffeinate has brought a lot of beloved Coffeescript projects into the hands of ES6 developers who wanted to contribute.
- coldtea 9y ago>I don't understand the trend to move from Coffeescript to ES6. ES6 is supported natively, it's an actual standard not a language a single person came with, it avoids a build step, it has all of Coffeescript features and more by this point, and Coffeescript's momentum has slowed. Seems a no-brainer. And as for concision, ES6 seems just as concise. At worse you need an extra } or so, which I like to have anyway.
- uranian 9y ago> it has all of Coffeescript features and more No! It seems you've never learned Coffeescript well enough to know the differences, just like too many other ES6 proponents.
- coldtea 9y agoI learned Coffeescript well enough to not care for the differences. There's nothing especially interesting Coffeescript has over ES6/7.
- o_____________o 9y agoI miss the existential operator like the deserts miss the rain foo?.bar?().baz?.boo
- MrLeap 9y agoTruly. That operator has most of the gravity that pulls me towards coffeescript. Lodash things, like _.isNil staunch the bleeding, but it's just.. not the same. I wrote coffeescript for 3 years, and the first 2 or 3 months was a frustrating learning curve. By the end of that job I really drank the koolaid. Coffeescript can be blissful. The complaints about invisible delimiters and stuff resonated with me for the first 2 weeks, but then I just learned it like you learn anything. If you are unsure what's going to happen, add extra parenthesis. I kept a window with js2.coffee on it so I could paste uncanny snippets while I was getting up to speed. After I got over the curve I stopped needing it. I think it was more frustrating in the beginning than learning most things because I knew JS pretty well prior and it felt like I was throwing my experience out the window. I'm glad I did it though. Writing coffeescript was really quite pleasant. Now regular javascript has jumped forward a bit and has somethings coffeescript doesn't, I still feel like the one true web language exists somewhere between them. I'm leading a project right now and every couple of days I get that coffeescript itch. Caffeine is hard to put down once you're addicted.
- o_____________o 9y ago! https://github.com/babel/babel/pull/5813 https://github.com/babel/babel/pull/5813
- MrLeap 9y agoJust found this. https://github.com/rongierlach/babel-plugin-syntax-exists https://github.com/rongierlach/babel-plugin-syntax-exists not the worst workaround in the short term. Better than lodash's _.get but worse than coffeescript. :P
- devoply 9y agoWell the point is choice. The more choice the better. I don't personally like intermediate languages. To each his own. I rather write javascript and css rather than get coffeescript or sass involved.
- sghiassy 9y agoAgreed - CoffeeScript was a great stop gap solution, but with ES6, it seems it's marginal utility is limited.
- devoply 9y agoWell you have to ask for whom. For existing coffee script developers, they can keep using it until they get up to date with ES6. It's a language and it takes time to learn.
- sghiassy 9y agoI'm not sure I'd agree that there is the concept of a "coffeescript" developer. Coffeescript is an intermediate language in the same way SASS is to CSS. If you program in SASS and feel out of touch touch with CSS, then I feel you've lost your way. In the same vein, if a CoffeeScript developer, needs "significant" time and investment to transition to ES6, then I would think there is a significant erosion in that developer's understanding of CoffeeScript's ES5 underpinnings.
- devoply 9y agoYeah you are right. I was making a general point in the case of coffee script perhaps it's irrelevant. I don't write it so I am not in the know.
- carc1n0gen 9y agoExcept sass is a fully backwards compatible superset to CSS, and coffescript is definitely not that to JavaScript.
- yojo 9y agoES6 has eliminated most (though not all) of the pain Coffeescript solved. I work on a large code base that went from Coffeescript -> Typescript (mostly manual, some decadfeinate), and typesafety has been a huge boon for our developers. For smaller teams/codebases, you might be happy sticking with Coffeescript.
- jononor 9y agoSo want typing support in CoffeeScript...
- koolba 9y agoThat'd be particularly difficult as CoffeeScript doesn't have var declarations.
- molszanski 9y agoPartly. You can define them if you want it. You can even add type support with FB Flow. CS developers sometimes define variables because of hoisting. Obviously, variables are defined. In CS they are simply defined for you automatically. That said, you can obviously do it yourself if you want. But you will not be able to use additional tooling around `let` and `const`
- jononor 9y agoCan one use FB flow with CoffeeScript? Comments I saw on github indicated that the CS compiler mangled it, I think due to how functions are named and stripping comments?
- molszanski 9y agoI personally don't really like types, but I've successfully used FB Flow with CS and it was fine.
- jononor 9y ago
- cbhl 9y agoIt looks like Microsoft's TypeScript is the new hotness (static types! just like Java and C++, but better), and it's only compatible with ES6, not Coffeescript.
- theprotocol 9y agoTypescript is a fantastic language with an absolutely horrid, bug-ridden configuration, tooling and ecosystem integration side. I say this after working with TS on a project for over a year now. In particular, attempting to use it with npm modules is an exercise in tedium, as its module resolution constantly breaks and bizarre, undefined behavior does not stop happening. I've found dozens, maybe hundreds of similar reports online, with no solutions offered. There are all sorts of arbitrary gotchas with its configuration as pertains to this and other things. "Oh, don't use outDir and it'll work." While it has great and straightforward integration with VS Code, it has disastrous integration with Visual Studio 2015 and 2017, the latter of which does not even support updating the bundled TS version at will without registry hacks. While TS emits code even in the case of errors, in many situations, Visual Studio refuses to complete the build process in case of TypeScript errors. For an ES6+->ES5 transpiler, it is also very strange in that it polyfills some things but not others, such as Promises and Maps. TypeScript has ultimately brought an unacceptable overhead to my project. It does not get out of the way as soon as you attempt to use it with the rest of the ecosystem. There belies its arrogance: it treats JavaScript as a second class citizen and favors Typings (additional files that assign types to plain JavaScript libraries). But in most cases, Typings are outdated, or nonexistent. Only recently has support for plain JavaScript libraries gotten better, with the AllowJS and CheckJS flags, the latter of which Visual Studio 2017 does not recognize for whatever reason. In my view, it comes with so much baggage that it's probably not worth using. Some of the solutions proposed by the project maintainers amount to writing boilerplate just to support JavaScript functions. It's essentially C header files: you have to write module declarations for certain plain JavaScript libraries to work. There are different versions of this boilerplate that you could be asked to write: you may be told to write a typings file (i.e. declare every single function of the library you want to use in a separate file, and add it to the project, possibly using ///<reference> in certain specific scenarios). There are also ad-hoc declarations of modules and constants/globals that you may or may not need to write (there is no idiom here, and the language regards this as going off-road).
- inimino 9y agoIt's not hard to understand. There's a cost to being in a community that's 1% the size. The benefits were mainly for Ruby devs coming to Node from Rails, and were easier to see before JS itself added most of the syntax conveniences that Coffeescript introduced.
- superplussed 9y agoAnd don't underestimate the cost that comes with a) having to justify your quirky Coffeescript codebase to potential hires and b) not getting the hires you want because they won't work in Coffeescript. This was my main motivation for leaving it behind, even though I prefer the Coffeescript syntax over ES*.
- watson 9y agoTrue. I've declined job offers based on their use of CoffeeScript
- kidmenot 9y agoAnd I totally believe that. I hated CoffeeScript with a passion since the moment I first laid my eyes on it. To give an idea of how much I dislike it, I would prefer to write plain Javascript. To me, CF looks like a bad attempt at inheriting Python's whitespace-to-delimit-blocks. Function calls are confusing, they hurt my eyes.
- stdbrouw 9y agoTo be honest, I wouldn't be interested in hiring someone whose entire line of reasoning in rejecting a programming language boils down to "function calls look funny, they hurt my eyes". So I guess that's a win-win.
- vinceguidry 9y agoFor real. It's hard to imagine somebody so fulfilled in their lives that the only way to move the needle is to go somewhere with that perfect tech stack. And not taking the job isn't even the best way to solve that problem. I'd ask them how married they were to CS and if moving off of it was doable. If the shop is reasonable they won't have any objections so long as you're not hurting delivery targets to pursue your pet project. If they're not reasonable then you've found out a very important fact about that shop and that in itself can be a deal breaker. I talked myself out of a job offer once when I stated that my main motivation for jumping was to work on a more well-maintained codebase. Kinda glad I did, but it was a wake-up call. If I'd tried to pull that shit when I didn't already have a great job, that would've sucked.
- mikemann7121 9y agoHi,, Most people failed to make money online because they don't have a proven system that works for them... Good news is, this system has helped more than 100 ordinary people, including newbies to make real money. You can be one of them too: http://rurl.us/v1GxM http://rurl.us/v1GxM The best part is... -You don't need to write or produce any unique content -You don't need to create any products to sell -You don't need to write up any sales letters -You don't need to provide any customer service or follow up support -You don't even need to learn about internet marketing! See how this can be done with real proof here: http://rurl.us/v1GxM http://rurl.us/v1GxM Don't be left behind.