Re: [Pharo-dev] Question about API / Backend

2015-06-17 Thread stepharo
I like this idea too because it makes clear that you are using an back-end specific behavior. Le 16/6/15 12:15, Henrik Johansen a écrit : On 16 Jun 2015, at 9:58 , Matthieu Lacaton matthieu.laca...@gmail.com mailto:matthieu.laca...@gmail.com wrote: Hello everybody, The question I have

Re: [Pharo-dev] Question about API / Backend

2015-06-16 Thread Matthieu Lacaton
Thank you for your answer, as you said, this pattern makes things quite clear for the user. I like it :) SDL is of course a somewhat special case, at it itself is an abstraction over different backends, and there's little functionality there that could not be part of a standard window API...

Re: [Pharo-dev] Question about API / Backend

2015-06-16 Thread Ben Coman
On Tue, Jun 16, 2015 at 6:15 PM, Henrik Johansen henrik.s.johan...@veloxit.no wrote: On 16 Jun 2015, at 9:58 , Matthieu Lacaton matthieu.laca...@gmail.com wrote: Hello everybody, The question I have concerns OSWindow and its backend : SDL. However, even if I'll speak about these two, i

Re: [Pharo-dev] Question about API / Backend

2015-06-16 Thread Matthieu Lacaton
I think the example of Henrik works fine if the user knows precisely what he wants to do. If I understand what Ben said, the following should also be possible : Create x subclasses of OSWindow (x being the number of backends available). For example : OSWindow subclass: OSWindowSDL OSWindow

[Pharo-dev] Question about API / Backend

2015-06-16 Thread Matthieu Lacaton
Hello everybody, The question I have concerns OSWindow and its backend : SDL. However, even if I'll speak about these two, i think the question is quite general and can apply to every API. There are some functions that we are sure we will find in every backend possible (for instance the

Re: [Pharo-dev] Question about API / Backend

2015-06-16 Thread Henrik Johansen
On 16 Jun 2015, at 9:58 , Matthieu Lacaton matthieu.laca...@gmail.com wrote: Hello everybody, The question I have concerns OSWindow and its backend : SDL. However, even if I'll speak about these two, i think the question is quite general and can apply to every API. There are some