caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: SP <sp@orbitalfox.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] RFH: can't figure out why my QT5 widget bindings segfault
Date: Thu, 7 Apr 2016 09:43:37 +0200	[thread overview]
Message-ID: <20160407074336.GC11304@frosties> (raw)
In-Reply-To: <20160406225621.GB644@tiger>

On Wed, Apr 06, 2016 at 11:56:21PM +0100, SP wrote:
> On Sat, Apr 02, 2016 at 01:38:41PM +0200, Goswin von Brederlow wrote:
> >With objects each class inherits all the data of the parent while
> >alowing the child to be used with methods of the parent.
> 
> This is part of the problem I'm referring to when I say "tracking the
> changes in the API".
> 
> >You can't do that with records or tuples. And if I have one class
> >definition per Qt5 class anyway I might as well expose that to the
> >user instead of hiding it in modules.
> 
> Yes, it would have to be new approach all together.

Then I'm afraid you have to rewrite Qt. You have to overload every
single Qt class to use the many virtual functions.
 
> There is still merit in having a one-to-one ocaml wrapper for Qt. If
> you can do the wrapping using some generator operating on the headers,
> even better.
> 
> But I would encourage that a higher level, functional wrapper is used
> for applications. It would be a shame if heavy object orientation
> affected user interface codebases because of such necessity.
> 
> -- 
>    SP

Feel free to do that. Personally I think a GUI is the worst fit for
functional programming and the best fit for object oriented. A GUI
screams side effect and mutability to me and a purely functional
approach I think is entirely pointless beyond the academical.

Luckily ocaml allows one to use both functional and object oriented
programming where it fits best.

MfG
	Goswin

      reply	other threads:[~2016-04-07  7:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 10:50 Goswin von Brederlow
2016-03-23 15:18 ` Anatoly Zaretsky
2016-03-23 17:18   ` François Bobot
2016-03-24 10:25     ` Goswin von Brederlow
2016-03-25 11:28       ` Goswin von Brederlow
2016-03-29 22:29         ` SP
2016-03-31 10:21           ` Goswin von Brederlow
2016-03-31 11:00             ` Jonas Jensen
2016-04-02 11:38               ` Goswin von Brederlow
2016-04-06 22:56                 ` SP
2016-04-07  7:43                   ` Goswin von Brederlow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160407074336.GC11304@frosties \
    --to=goswin-v-b@web.de \
    --cc=caml-list@inria.fr \
    --cc=sp@orbitalfox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).