On March 31, 2015 8:55:02 AM Élie Roux <[email protected]> wrote:

Le 31/03/2015 14:42, Henry So Jr. a écrit :
> I've spent about six hours transforming the code into the proposed
> union of special_or_note.  Because of the way specials bubble up from
> note to glyph to element, I had to add conditional statements based on
> type to copy the correct structures.  I'm basically building a
> polymorphic structure by hand.
>
> I don't think further work on this activity is worth it.  Too many bugs
> will be introduced in the complete transformation, and the structure
> will ony become slightly more intelligible when debugging at a
> significant cost to complexity.

I'm not sure I understand: did you manage to get something but not
complete, or did you try but saw that it was almost impossible to get
something safe?


I got about half way through refactoring it and found that it would be very haphazard.

> However, I do think it's worth considering a switch to an object
> oriented language rather than trying to build polymorphism by hand.  If
> we decide to do that, then re-coding the structures would be worth it.
>
> Thoughts?

Agreed, but I'm not sure C++ is the right choice, I would choose a more
simple (with a garbage collector) widespread language like Python or
Ruby... What do you think? Or if a switch to C++ is really "easy" and
would cost much less, why not. It would be a good first step towards an
easier language anyway.

I'm not sure I have the energy for this (especially since I'm not a big
fan of C++), but I'd be really happy if someone does!

I share your misgivings on C++. I'm only suggesting something object oriented. Garbage collection is a plus. If it were just for myself, I'd be fine with something like Ruby, but that just makes it more complex to install.

If we change, language choice is important unless we provide packages for Linux distros as well. For example, D seems to fit: it compiles to a binary and has garbage collection; but who has a compiler for D? C#, Java, and scripting languages require large library installs. C++ may be the only remaining viable option, but more research is necessary.

I'm sure you'll agree this is not a decision to take lightly.

Henry



_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel

Répondre à