The conversion from CoffeeScript to JavaScript occurs on the server.

The generated JavaScript is quite straight-forward for most cases.

CoffeeScript is more concise than JavaScript; it includes a couple of
higher-order features, such as really smart loops, and smarter
handling of function parameters; providing defaults, and handling
extra arguments nicely.

The -> and => syntax for defining functions is close to ideal for the
web, where you constantly introduce new functions.

Each module is automatically packaged up inside a hygienic function.
All variables are declared before being used.  CoffeeScript supports
variable interpolation inside strings.

However, if you want to replace a module (by contributing an override
to the ModuleManager service), you can write that module is JavaScript
or CoffeeScript.

In fact, I haven't actually added support for CoffeeScript to the
project; that will be a suggested add-on module that hasn't been
written. Currently, the build is responsible for compiling
CoffeeScript into JavaScript; what's getting packaged inside
tapestry-core.jar is JavaScript.

In the future, there will be a module that will detect the ".coffee"
file extension, and convert that to JavaScript as needed, at runtime.

Ive used CoffeeScript extensively over the last six months; I like it,
I like how my code looks, I think the code is easier to follow and
mantain.  Brendan Eich thinks so too ... he's adapting idea from
CoffeeScript (and from Python, and elsewhere) into the next-generation
version of JavaScript.

On Thu, Nov 1, 2012 at 11:10 AM, Thiago H de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Thu, 01 Nov 2012 16:02:21 -0200, Paul Stanton <p...@mapshed.com.au>
> wrote:
>
>> ok, our usage of the term 'monkey-patch' is where the misunderstanding is.
>> I mean, patch. not monkey-patch, in your definition.
>
>
> That's why I always told my students: use the right words, the right names,
> the right terminologies all the times, because otherwise people won't
> understand you. :)
>
> Monkey-patching in JavaScript and other dynamic-typed languages has a very
> specific definition: changing some function by overriding it through code in
> runtime. The source code is *not* changed. Patching, in the source code
> sense, is something completely different, because it doesn't occur in
> runtime, being done on the source itself. What you're doing is patching, but
> not monkey-patching at all.
>
> According to Wikipedia: http://en.wikipedia.org/wiki/Monkey_patch:
>
> A monkey patch is a way to extend or modify the run-time code of dynamic
> languages without altering the original source code. This process has also
> been termed duck punching.[1]
>
> Regarding the gains of using CoffeeScript: I've never used it, so I cannot
> answer that.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to