cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <pmue...@gmail.com>
Subject Re: cli & plugman - optimist, nopt - refactoring
Date Wed, 29 Jan 2014 20:24:07 GMT
I could be wrong, but thought I remembered TypeScript had a story where you
could provide type-hinting prototypes (in the C sense), and then do some
kind of analysis of plain old JS code that could inform you of interesting
things.  That would be an interesting angle that would require us to
convert everything to TypeScript but still get some advantages.


On Wed, Jan 29, 2014 at 12:35 PM, Dick Van den Brink <
d_vandenbrink@outlook.com> wrote:

> I understand you don't like the extra compile step but for example
> TypeScript compiles to very readable javascript and isn't a new language to
> learn, it is just JavaScript with types.
>
> I love how it helps me with code analysis, compile time checking and
> refactoring.
>
> just my 2 cents
>
>
>
>
>
>
> Verzonden met Windows Mail
>
>
>
>
>
> Van: Brian LeRoux
> Verzonden: woensdag 29 januari 2014 18:17
> Aan: dev@cordova.apache.org
>
>
>
>
>
> Ya to echo that I <3 the transpiled / altjs idea but we have a leaky enough
> abstraction without adding another compile step in there!
>
>
> On Wed, Jan 29, 2014 at 7:19 AM, Braden Shepherdson <braden@chromium.org
> >wrote:
>
> > I use CoffeeScript all the time in my own hackery. In Cordova, though,
> big
> > -1 to alternative languages. Let's keep it straight Javascript.
> >
> > Otherwise these changes sound solid. You have to understand that these
> > tools, like any project that's been around longer than a few weeks, has
> had
> > several partial refactorings. Plugman's methods that now take an opts
> > object used to have an ever-growing list of optional parameters, until I
> > refactored them last summer. I cleaned up a bunch of the argument parsing
> > in CLI's subcommands while doing the big promises refactoring in
> September,
> > but didn't change them to options objects at the time, since it was a
> > distraction.
> >
> > I'm all for continuing to refactor the internals of these tools to make
> > them gradually more pleasant to hack on. I'd love to see these changes
> > broken up a bit, but the main thing is they need to apply cleanly.
> >
> > Braden
> >
> >
> > On Tue, Jan 28, 2014 at 7:25 PM, Brian LeRoux <b@brian.io> wrote:
> >
> > > I'd rather we avoid custom libs as they are limiting (such as optimist)
> > and
> > > I'm a big no on transpiled languages until we see better debugging
> > support.
> > >
> > >
> > > On Tue, Jan 28, 2014 at 3:55 PM, Anis KADRI <anis.kadri@gmail.com>
> > wrote:
> > >
> > > > On Tue, Jan 28, 2014 at 2:21 PM, Jonathan Bond-Caron <
> > > > jbondc@gdesolutions.com> wrote:
> > > >
> > > > > -          Should I split the patch in multiple pieces? How?
> > > > >
> > > >
> > > > That would be ideal but since you have already started it will be
> > > difficult
> > > > to split it up. Won't it?
> > > >
> > > >
> > > > >
> > > > > -          Anything I'm overlooking or some objections with it?
> > > > >
> > > >
> > > > Your changes are welcome. However, I think the biggest part that
> needs
> > a
> > > > refactor (rewrite?) right now is plugman's config-changes.js [1]
> > > >
> > > >
> > > > >
> > > > > -          Any thoughts on using TypeScript or Coffeescript as a
> > > library
> > > > > (e.g. cordova-lib)?
> > > > >
> > > >
> > > > I'd rather we keep using JavaScript but it could be a nice
> experiment.
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;a=blob;f=src/util/config-changes.js;h=5c212ae5a5f8fbb8d6e6385c20499ae64436a574;hb=HEAD
> > > >
> > >
> >
>



-- 
Patrick Mueller
http://muellerware.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message