Hi,

On 25.05.2013, at 16:15, Daniel Wagner <wagne...@seas.upenn.edu> wrote:

>>> ...in fact, just generally all feedback on this split is welcome. =)
>> 
>> Before I try to do a visual diff: Could you detail what got
>> duplicated? Just the cabal file and the Setup.hs? Or are there modules
>> that cannot be customized using CPP flags?
> 
> Actually, quite a lot of things got duplicated. Anything that was *not* 
> inside #if's before -- the interface that's common between gtk2 and 
> gtk3, which is the bulk of the code, I believe -- is now duplicated 
> between the two packages.
> 
> It's not that things *can't* be customized with CPP -- just that 
> downstream packages would have no way of influencing which way the CPP 
> went. There is a lot of shared interface, but there's also a lot of 
> unshared interface, and this means it would be perfectly reasonable to 
> write a GUI that targets gtk3 but not gtk2 (or vice versa). But there 
> would be nothing you could write in your cabal file that would say "I 
> want gtk3 and not gtk2" (or vice versa). You would just have to tell 
> your users "well, build gtk2hs with the -fgtk3 flag" and then if they 
> have other software that they want to use that tells them "build with 
> the -f-gtk3 flag" they're just hosed. They can't do both.
> 

Uh, but code duplication means you have to fix bugs in two places.

So is there no way to build CPP'd code base once as gtk2 with one cabal file 
and then to build it as gtk3 with another cabal file. Then you'd have one code 
base and CPP stuff managing the difference between them.

Isn't it a bit like the GHC_VERSION and GTK_VERSION macros? Eventually you 
might want to get rid of everything that is inside #ifdefs for versions that 
you don't want to support any longer (e.g. in a few years you might get rid of 
everything that is Gtk2 related).

My 2p,
Axel


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to