Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Functional programming languages and Qt
QtWS25 Last Chance

Functional programming languages and Qt

Scheduled Pinned Locked Moved Language Bindings
20 Posts 13 Posters 20.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ramblurr
    wrote on last edited by
    #8

    Wow this is sweet. I'll have to check this out one day(TM).

    1 Reply Last reply
    0
    • P Offline
      P Offline
      polos
      wrote on last edited by
      #9

      There is also "EQL" (a Qt binding embedded in ECL: a Common Lisp which compiles to C).

      It can be used as a Qt binding, and additionally it can easily be embedded in C++ (direct function calls in both directions).

      http://gitorious.org/eql/pages/Home

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rdonovan2005
        wrote on last edited by
        #10

        perhaps some what obvious but you can use Scala with Qt Jamibi (http://qtjambi.sourceforge.net/)

        Richard D

        1 Reply Last reply
        0
        • I Offline
          I Offline
          ivan
          wrote on last edited by
          #11

          The problem with Scala+Jambi is that the Qt classes (for example for collections) are not scala's collections and they will not have folds and similar.

          I'm currently working on a small Qt addon library [1] to allow you to develop in Qt/C++ with some of the funtional concepts.

          It will have greedy and lazy evals for most of the things, and whatnot. It is currently not in open development, but it will become soon, and it will be published under LGPL or some BSD-like license.

          Obviously, this is not really a functional language, but lambdas in C++2011 brought some new very nice possibilities.

          [1] http://ivan.fomentgroup.org/blog/category/qt-functional/

          Ivan Čukić | ivan.cukic(at)kde.org | KDE e.V.
          Qt Ambassador (from the old Nokia days)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            skypjack
            wrote on last edited by
            #12

            New C++ standard defines lambda support, so you will have Qt with functional language integrated... for free!! :-)
            You have to wait only for a little time...

            1 Reply Last reply
            0
            • I Offline
              I Offline
              ivan
              wrote on last edited by
              #13

              Not really, if Qt doesn't have the APIs for lambdas and functors, you will not have too many places to use lambdas in your code.

              At the moment, there's work being done for QObject::connect to work with lambdas. Lets hope it will get into Qt 5.

              Ivan Čukić | ivan.cukic(at)kde.org | KDE e.V.
              Qt Ambassador (from the old Nokia days)

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Ramblurr
                wrote on last edited by
                #14

                Anyone tried using Qt Jambi with "clojure":http://clojure.org?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #15

                  [quote author="Ivan Čukić" date="1312874479"]Not really, if Qt doesn't have the APIs for lambdas and functors, you will not have too many places to use lambdas in your code.

                  At the moment, there's work being done for QObject::connect to work with lambdas. Lets hope it will get into Qt 5.[/quote]

                  And of course, you will be able to use them with QtConcurrent (works fine already with Boost's implementation). What is missing, do you think?

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    ivan
                    wrote on last edited by
                    #16

                    [quote author="Andre" date="1314860619"]What is missing, do you think? [/quote]

                    The missing is the stuff that I'm trying to address with QtFunctional - functional way of dealing with the collections - stuff like list.filter(some lambda), ... lazy evaluation for things ...

                    Ivan Čukić | ivan.cukic(at)kde.org | KDE e.V.
                    Qt Ambassador (from the old Nokia days)

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Smar
                      wrote on last edited by
                      #17

                      [quote author="Ivan Čukić" date="1314867006"][quote author="Andre" date="1314860619"]What is missing, do you think? [/quote]

                      The missing is the stuff that I'm trying to address with QtFunctional - functional way of dealing with the collections - stuff like list.filter(some lambda), ... lazy evaluation for things ...

                      [/quote]

                      If you get anything usable done, maybe we could generate Jambi bindings for it... So those using Scala could use this, or maybe in Java, hack some support for it somehow... Would be very interest at least.

                      Java 8 is said to get lambdas, so atleast something can be done, if not doing anything for actual model Jambi works for example with signals and slots.

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        ivan
                        wrote on last edited by
                        #18

                        Not sure how plusable would jambi bindings for this be since the library is overly template based, but yes, if it turns out to be possible, scala+qt would be quite awesome.

                        Ivan Čukić | ivan.cukic(at)kde.org | KDE e.V.
                        Qt Ambassador (from the old Nokia days)

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Smar
                          wrote on last edited by
                          #19

                          Templates just need manual mapping; if there is common idiom, I guess some kind of automation could be done for common types... All speculation without the library to convert, though :)

                          1 Reply Last reply
                          0
                          • I Offline
                            I Offline
                            ivan
                            wrote on last edited by
                            #20

                            I have no clue how would you map things, but from my standpoint, it doesn't seem possible. Templates here are used for things that java generics can't do... heck, not even all C++ compilers can process the code :)

                            The library is at http://gitorious.org/qt-functional

                            Not sure how many more improvements it will receive in the next period. Hoping I'll have the times to work on it again in a few months.

                            Ivan Čukić | ivan.cukic(at)kde.org | KDE e.V.
                            Qt Ambassador (from the old Nokia days)

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved