Boost logo

Boost :

Subject: Re: [boost] [mpl] multiset
From: Bruno Dutra (brunocodutra_at_[hidden])
Date: 2015-02-25 09:29:28


2015-02-24 21:17 GMT-03:00, Niall Douglas <s_sourceforge_at_[hidden]>:
> I'm curious: could Hana be wrapped with a MPL compatible shim API? As
> in, would that be a sane or insane idea?
I might not be the best to answer this, perhaps Louis Dionne could
give us his opinion as well, but the way I see it, it is certainly
feasible, though possibly not that easy. That said, I doubt it would
be a reasonable approach though.

See, while MPL relies on template overloading for type computing, Hana
follows a completely alternative philosophy, ingeniously hijacking
compile time constexpr value computations to perform type
computations. Regardless, Louis has stated Hana already provides
interoperability with MPL, so they should be able coexist.

2015-02-25 10:40 GMT-03:00, Ganesh Prasad <sir.gnsp_at_[hidden]>:
> Metaprogramming can be made easier with an alternative syntax, like Hana
> does. But functional is not the only solution. We can try with a Logic
> oriented syntax. C++ supports almost every major paradigm out there, except
> for logic (like prolog). And wrapping a logic oriented syntax over
> metaprograms would actually help programmers to handle complex inheritance
> patterns conveniently.
>
> Well, it's just an idea. I had tried with functional syntax (from scratch)
> about one year ago. And I have been thinking about a logic oriented syntax
> (I had even considered something like JQuery, though I rejected that idea
> eventually). It would be great if the logic programming idea could be
> acceptable for GSoC, I would be more than happy to work on it. Here is the
> link to my attempt at functional syntax over metaprogramming.
>
> https://github.com/GnsP/GNS--META_LISCPP
>
> Also, Bruno C. O. Dutra has worked in a very similar field, in fact he has
> already implemented a compile time logic library.

Indeed, I’ve been working for some time on a logic oriented compile
time library based on prolog, I’ve called it, not surprisingly,
metalog [1]. But I never thought of it as a replacement for MPL or
even an alternative, on the contrary, my goal from the beginning was
to build it atop MPL in a way it could enhance it. In fact, motivated
by this very discussion I’m having with you gentlemen here, I’ve been
fiddling with the idea of attempting a complete overhaul of MPL,
incorporating metalog so as provide a logic interface based on the
unification and SLD resolution algorithms, yet preserving complete
beckwards compatibility. I must add a disclaimer here though: metalog
is still under heavy yet slow development, as I sadly don’t dispose of
that much time to invest in it right now.

Aside from that, I’ve been also in contact with Louis discussing the
idea of porting metalog to Hana as a use case. Perhaps logic
predicates could prove a useful add on to Hana as well.

Perhaps we could work together on one of these attempts Ganesh Prasad.

[1]: https://github.com/brunocodutra/metalog

-- 
*Bruno C. O. Dutra*

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk