Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #20762

Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples

From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples
Date 2013-07-20 19:48 +0200
Organization albasani.net
Message-ID <kseii0$frv$1@news.albasani.net> (permalink)
References <38b6a684-466b-42b7-a1b9-369cbe41daa9@googlegroups.com>

Show all headers | View raw


On 2013-07-20 18:25, Mark Watson wrote:
> [Meteor, Ember.js, CoffeeScript, ClojureScript]

Dozens of platforms, frameworks, meta-languages and other productivity
enhancements for JavaScript-based applications are released every week.
Some of the ones you mentioned are (IMHO) too new/immature to be useful
in book examples. Time will tell if they're here to stay or just passing
fads.

That said, CoffeScript has been well established and stable for many
years, and many serious JS developers will have had some contact with it
by now.

> I have much less experience with Coffeescript, but it really does
> seem like a nice little language.
> 
> My question: would having the examples in Coffeescript put off
> Javascript programmers from wanting to read my new book project? And,
> vice-versa: would Coffeescript developers not like the book if I use
> Javascript for the examples?

I know some JavaScript developers who won't look at a book or project if
it uses a meta language like CoffeeScript. On the other hand, I would
imagine that most CoffeeScript users are also more or less familiar with
JavaScript.
CoffeeScript enthusiasts would be excited to see the examples in their
preferred language, but everybody else would have to learn new syntactic
rules and install the associated tools.

What it comes down to: do you want to make your book accessible to as
many people as possible, or do you want your examples to look pretty (by
using a less common "nice little language" like CoffeScript)?

If the main focus of the book is the AI topic, then the language used in
the examples is secondary - CoffeeScript or even pseudo code would be
fine. But if you want your readers to be able to quickly understand and
experiment with the examples, then JavaScript would be my first choice.

> I am also thinking of using Coffeescript, and for each example
> taking the generated Javascript and manually editing it and cleaning it
> up, so the examples would be available in both languages - that seems like a
> hassle, but worthwhile if that is what people want.

That doesn't sound like a terribly good idea. Double the code to
maintain, for very little benefit. Maybe you should ask in a
CoffeeScript forum if anybody there would be interested in AI books even
if the examples are in plain old JS.


- stefan

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples Mark Watson <mark.watson@gmail.com> - 2013-07-20 09:25 -0700
  Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples Stefan Weiss <krewecherl@gmail.com> - 2013-07-20 19:48 +0200
  Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples Scott Sauyet <scott@sauyet.com> - 2013-07-20 18:21 +0000
  Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-07-20 14:56 -0700
    Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples Stefan Weiss <krewecherl@gmail.com> - 2013-07-21 00:50 +0200
      Re: I am writing a new book on Artificial Intelligence: trying to decide between Coffeescript and Javascript for examples "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-07-20 16:02 -0700

csiph-web