Re: how do you name your protocols?

2014-12-29 Thread Luc Prefontaine
I do this when there is added value, like sone common logic I can wrap on top 
of the protocol methods that I do not want to call/duplicate in every 
implementation.

But this is quite specific to my own app.

The lifecycle's only purpose is to be extended to your own components.

Can't see what would be the added value here, the wrapping fn would only be 
calling the protocol method.

Nothing else...

If you require more in your context then define your own wrapper.

Nothing generic can help you at this point... I think...

Luc P.

> I was just refering to the fact that the 'start' protocol method is meant
> to be called directly by library's users.
> I'm not using components in any of my projects, so take it with a grain of
> salt. It seems to me that it would be better (i.e. less coupled, fewer
> assumptions about the starting process for implementers, more freedom for
> Stuart to introduce non-breaking implementation changes) to have a
> dedicated start function, that in its simplest form would just call
> Lifecycle/start method.
> 
> Jozef
> 
> On Mon, Dec 29, 2014 at 3:40 PM, Malcolm Sparks  wrote:
> 
> > I agree with you and Meikel's points about wrapping protocols with API
> > functions, it makes sense, especially if you want to combine these calls
> > with (Prismatic) schema checks.
> >
> > However, I'm not sure about your point that Stuart made an 'unfortunate'
> > design to 'expose' protocol methods directly, it's just a necessary
> > consequence of the component design, unless you can suggest an alternative
> > approach.
> >
> > On Sunday, 28 December 2014 16:54:30 UTC, Jozef Wagner wrote:
> >>
> >> I was not implying anything about what Rich have said. While the SPI
> >> term may be used in the 'enterprise' field too much (and in an unnecessary
> >> complicated manner), I think it has perfectly valid uses in Clojure. The
> >> API tells you what a function or a macro does for you, but SPI tells you
> >> what you have to do in order to integrate with existing functionalities.
> >>
> >> BTW I think protocol methods should be in SPI too. (Stuart's components
> >> library made IMO a bit unfortunate decision to expose 'start' and 'stop'
> >> protocol methods directly) See http://kotka.de/blog/2011/
> >> 07/Separation_of_concerns.html for a related write-up.
> >>
> >> Jozef
> >>
> >> On Sunday, December 28, 2014 4:18:47 PM UTC+1, adrian...@mail.yu.edu
> >> wrote:
> >>>
> >>> You're overlooking the fact that a "service provider interface" is
> >>> simply enterprise design pattern jargon for a subset of public APIs that
> >>> expose the underlying interfaces of the library to consumers. Saying that
> >>> Rich is saying protocols should "never ever" be part of the public API is
> >>> both misleading and false.
> >>>
> >>> On Sunday, December 28, 2014 2:50:06 AM UTC-5, Jozef Wagner wrote:
> 
>  Protocols should never ever be part of public API. Protocols can be
>  part of the SPI, if custom extensions are to be supported. Otherwise they
>  are an implementation detail. See Rich's talk at 4:30 http://vimeo.com/
>  100518968
> 
>  Jozef
> 
>  On Sun, Dec 28, 2014 at 8:11 AM, Mikera  wrote:
> 
> > That depends if the protocols are part of your user-facing API or not
> > - a lot of the time I find that protocols are best hidden as 
> > implementation
> > details rather than exposed to users.
> >
> > In core.matrix, for example, users never see the protocols directly:
> > only implementers of new matrix libraries need to care
> >
> > On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
> >>
> >> Changing old protocol names should trigger a major revision change in
> >> the minimum because it breaks backwards compatibility.
> >>
> >> --Ashton
> >>
> >> Sent from my iPhone
> >>
> >> > On Dec 27, 2014, at 11:18 AM, Michael Klishin <
> >> michael@gmail.com> wrote:
> >> >
> >> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com)
> >> wrote:
> >> >> clj-time seems to be naming protocols inconsistently. It uses
> >> >> ISomething, Something and SomethingProtocol naming.
> >> >
> >> > I suspect it is because it has 60 contributors and most users never
> >> have to
> >> > extend the protocols.
> >> >
> >> > Feel free to submit a PR that standardises all names on Something.
> >> > --
> >> > @michaelklishin, github.com/michaelklishin
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Clojure" group.
> >> > To post to this group, send email to clo...@googlegroups.com
> >> > Note that posts from new members are moderated - please be patient
> >> with your first post.
> >> > To unsubscribe from this group, send email to
> >> > clojure+u...@googlegroups.com
> >> > For more options, visit this group at
> >> > http://groups.goo

Re: how do you name your protocols?

2014-12-29 Thread Jozef Wagner
I was just refering to the fact that the 'start' protocol method is meant
to be called directly by library's users.
I'm not using components in any of my projects, so take it with a grain of
salt. It seems to me that it would be better (i.e. less coupled, fewer
assumptions about the starting process for implementers, more freedom for
Stuart to introduce non-breaking implementation changes) to have a
dedicated start function, that in its simplest form would just call
Lifecycle/start method.

Jozef

On Mon, Dec 29, 2014 at 3:40 PM, Malcolm Sparks  wrote:

> I agree with you and Meikel's points about wrapping protocols with API
> functions, it makes sense, especially if you want to combine these calls
> with (Prismatic) schema checks.
>
> However, I'm not sure about your point that Stuart made an 'unfortunate'
> design to 'expose' protocol methods directly, it's just a necessary
> consequence of the component design, unless you can suggest an alternative
> approach.
>
> On Sunday, 28 December 2014 16:54:30 UTC, Jozef Wagner wrote:
>>
>> I was not implying anything about what Rich have said. While the SPI
>> term may be used in the 'enterprise' field too much (and in an unnecessary
>> complicated manner), I think it has perfectly valid uses in Clojure. The
>> API tells you what a function or a macro does for you, but SPI tells you
>> what you have to do in order to integrate with existing functionalities.
>>
>> BTW I think protocol methods should be in SPI too. (Stuart's components
>> library made IMO a bit unfortunate decision to expose 'start' and 'stop'
>> protocol methods directly) See http://kotka.de/blog/2011/
>> 07/Separation_of_concerns.html for a related write-up.
>>
>> Jozef
>>
>> On Sunday, December 28, 2014 4:18:47 PM UTC+1, adrian...@mail.yu.edu
>> wrote:
>>>
>>> You're overlooking the fact that a "service provider interface" is
>>> simply enterprise design pattern jargon for a subset of public APIs that
>>> expose the underlying interfaces of the library to consumers. Saying that
>>> Rich is saying protocols should "never ever" be part of the public API is
>>> both misleading and false.
>>>
>>> On Sunday, December 28, 2014 2:50:06 AM UTC-5, Jozef Wagner wrote:

 Protocols should never ever be part of public API. Protocols can be
 part of the SPI, if custom extensions are to be supported. Otherwise they
 are an implementation detail. See Rich's talk at 4:30 http://vimeo.com/
 100518968

 Jozef

 On Sun, Dec 28, 2014 at 8:11 AM, Mikera  wrote:

> That depends if the protocols are part of your user-facing API or not
> - a lot of the time I find that protocols are best hidden as 
> implementation
> details rather than exposed to users.
>
> In core.matrix, for example, users never see the protocols directly:
> only implementers of new matrix libraries need to care
>
> On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>>
>> Changing old protocol names should trigger a major revision change in
>> the minimum because it breaks backwards compatibility.
>>
>> --Ashton
>>
>> Sent from my iPhone
>>
>> > On Dec 27, 2014, at 11:18 AM, Michael Klishin <
>> michael@gmail.com> wrote:
>> >
>> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com)
>> wrote:
>> >> clj-time seems to be naming protocols inconsistently. It uses
>> >> ISomething, Something and SomethingProtocol naming.
>> >
>> > I suspect it is because it has 60 contributors and most users never
>> have to
>> > extend the protocols.
>> >
>> > Feel free to submit a PR that standardises all names on Something.
>> > --
>> > @michaelklishin, github.com/michaelklishin
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clo...@googlegroups.com
>> > Note that posts from new members are moderated - please be patient
>> with your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+u...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>> > ---
>> > You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> > To unsubscribe from this group and stop receiving emails from it,
>> send an email to clojure+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>
  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this 

Re: how do you name your protocols?

2014-12-29 Thread Malcolm Sparks
I agree with you and Meikel's points about wrapping protocols with API 
functions, it makes sense, especially if you want to combine these calls 
with (Prismatic) schema checks.

However, I'm not sure about your point that Stuart made an 'unfortunate' 
design to 'expose' protocol methods directly, it's just a necessary 
consequence of the component design, unless you can suggest an alternative 
approach.

On Sunday, 28 December 2014 16:54:30 UTC, Jozef Wagner wrote:
>
> I was not implying anything about what Rich have said. While the SPI term 
> may be used in the 'enterprise' field too much (and in an unnecessary 
> complicated manner), I think it has perfectly valid uses in Clojure. The 
> API tells you what a function or a macro does for you, but SPI tells you 
> what you have to do in order to integrate with existing functionalities.
>
> BTW I think protocol methods should be in SPI too. (Stuart's components 
> library made IMO a bit unfortunate decision to expose 'start' and 'stop' 
> protocol methods directly) See 
> http://kotka.de/blog/2011/07/Separation_of_concerns.html for a related 
> write-up.
>
> Jozef
>
> On Sunday, December 28, 2014 4:18:47 PM UTC+1, adrian...@mail.yu.edu 
> wrote:
>>
>> You're overlooking the fact that a "service provider interface" is simply 
>> enterprise design pattern jargon for a subset of public APIs that expose 
>> the underlying interfaces of the library to consumers. Saying that Rich is 
>> saying protocols should "never ever" be part of the public API is both 
>> misleading and false. 
>>
>> On Sunday, December 28, 2014 2:50:06 AM UTC-5, Jozef Wagner wrote:
>>>
>>> Protocols should never ever be part of public API. Protocols can be part 
>>> of the SPI, if custom extensions are to be supported. Otherwise they are an 
>>> implementation detail. See Rich's talk at 4:30 
>>> http://vimeo.com/100518968
>>>
>>> Jozef
>>>
>>> On Sun, Dec 28, 2014 at 8:11 AM, Mikera  wrote:
>>>
 That depends if the protocols are part of your user-facing API or not - 
 a lot of the time I find that protocols are best hidden as implementation 
 details rather than exposed to users.

 In core.matrix, for example, users never see the protocols directly: 
 only implementers of new matrix libraries need to care

 On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>
> Changing old protocol names should trigger a major revision change in 
> the minimum because it breaks backwards compatibility. 
>
> --Ashton 
>
> Sent from my iPhone 
>
> > On Dec 27, 2014, at 11:18 AM, Michael Klishin  
> wrote: 
> > 
> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com) 
> wrote: 
> >> clj-time seems to be naming protocols inconsistently. It uses   
> >> ISomething, Something and SomethingProtocol naming. 
> > 
> > I suspect it is because it has 60 contributors and most users never 
> have to 
> > extend the protocols. 
> > 
> > Feel free to submit a PR that standardises all names on Something. 
> > --   
> > @michaelklishin, github.com/michaelklishin 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> > Note that posts from new members are moderated - please be patient 
> with your first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, 
> send an email to clojure+u...@googlegroups.com. 
> > For more options, visit https://groups.google.com/d/optout. 
>

>>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-28 Thread Jozef Wagner
I was not implying anything about what Rich have said. While the SPI term 
may be used in the 'enterprise' field too much (and in an unnecessary 
complicated manner), I think it has perfectly valid uses in Clojure. The 
API tells you what a function or a macro does for you, but SPI tells you 
what you have to do in order to integrate with existing functionalities.

BTW I think protocol methods should be in SPI too. (Stuart's components 
library made IMO a bit unfortunate decision to expose 'start' and 'stop' 
protocol methods directly) See 
http://kotka.de/blog/2011/07/Separation_of_concerns.html 
for a related write-up.

Jozef

On Sunday, December 28, 2014 4:18:47 PM UTC+1, adrian...@mail.yu.edu wrote:
>
> You're overlooking the fact that a "service provider interface" is simply 
> enterprise design pattern jargon for a subset of public APIs that expose 
> the underlying interfaces of the library to consumers. Saying that Rich is 
> saying protocols should "never ever" be part of the public API is both 
> misleading and false. 
>
> On Sunday, December 28, 2014 2:50:06 AM UTC-5, Jozef Wagner wrote:
>>
>> Protocols should never ever be part of public API. Protocols can be part 
>> of the SPI, if custom extensions are to be supported. Otherwise they are an 
>> implementation detail. See Rich's talk at 4:30 http://vimeo.com/100518968
>>
>> Jozef
>>
>> On Sun, Dec 28, 2014 at 8:11 AM, Mikera  wrote:
>>
>>> That depends if the protocols are part of your user-facing API or not - 
>>> a lot of the time I find that protocols are best hidden as implementation 
>>> details rather than exposed to users.
>>>
>>> In core.matrix, for example, users never see the protocols directly: 
>>> only implementers of new matrix libraries need to care
>>>
>>> On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:

 Changing old protocol names should trigger a major revision change in 
 the minimum because it breaks backwards compatibility. 

 --Ashton 

 Sent from my iPhone 

 > On Dec 27, 2014, at 11:18 AM, Michael Klishin  
 wrote: 
 > 
 >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com) 
 wrote: 
 >> clj-time seems to be naming protocols inconsistently. It uses   
 >> ISomething, Something and SomethingProtocol naming. 
 > 
 > I suspect it is because it has 60 contributors and most users never 
 have to 
 > extend the protocols. 
 > 
 > Feel free to submit a PR that standardises all names on Something. 
 > --   
 > @michaelklishin, github.com/michaelklishin 
 > 
 > -- 
 > You received this message because you are subscribed to the Google 
 > Groups "Clojure" group. 
 > To post to this group, send email to clo...@googlegroups.com 
 > Note that posts from new members are moderated - please be patient 
 with your first post. 
 > To unsubscribe from this group, send email to 
 > clojure+u...@googlegroups.com 
 > For more options, visit this group at 
 > http://groups.google.com/group/clojure?hl=en 
 > --- 
 > You received this message because you are subscribed to the Google 
 Groups "Clojure" group. 
 > To unsubscribe from this group and stop receiving emails from it, 
 send an email to clojure+u...@googlegroups.com. 
 > For more options, visit https://groups.google.com/d/optout. 

>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-28 Thread adrian . medina
You're overlooking the fact that a "service provider interface" is simply 
enterprise design pattern jargon for a subset of public APIs that expose 
the underlying interfaces of the library to consumers. Saying that Rich is 
saying protocols should "never ever" be part of the public API is both 
misleading and false. 

On Sunday, December 28, 2014 2:50:06 AM UTC-5, Jozef Wagner wrote:
>
> Protocols should never ever be part of public API. Protocols can be part 
> of the SPI, if custom extensions are to be supported. Otherwise they are an 
> implementation detail. See Rich's talk at 4:30 http://vimeo.com/100518968
>
> Jozef
>
> On Sun, Dec 28, 2014 at 8:11 AM, Mikera  > wrote:
>
>> That depends if the protocols are part of your user-facing API or not - a 
>> lot of the time I find that protocols are best hidden as implementation 
>> details rather than exposed to users.
>>
>> In core.matrix, for example, users never see the protocols directly: only 
>> implementers of new matrix libraries need to care
>>
>> On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>>>
>>> Changing old protocol names should trigger a major revision change in 
>>> the minimum because it breaks backwards compatibility. 
>>>
>>> --Ashton 
>>>
>>> Sent from my iPhone 
>>>
>>> > On Dec 27, 2014, at 11:18 AM, Michael Klishin  
>>> wrote: 
>>> > 
>>> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com) 
>>> wrote: 
>>> >> clj-time seems to be naming protocols inconsistently. It uses   
>>> >> ISomething, Something and SomethingProtocol naming. 
>>> > 
>>> > I suspect it is because it has 60 contributors and most users never 
>>> have to 
>>> > extend the protocols. 
>>> > 
>>> > Feel free to submit a PR that standardises all names on Something. 
>>> > --   
>>> > @michaelklishin, github.com/michaelklishin 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> > Groups "Clojure" group. 
>>> > To post to this group, send email to clo...@googlegroups.com 
>>> > Note that posts from new members are moderated - please be patient 
>>> with your first post. 
>>> > To unsubscribe from this group, send email to 
>>> > clojure+u...@googlegroups.com 
>>> > For more options, visit this group at 
>>> > http://groups.google.com/group/clojure?hl=en 
>>> > --- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-28 Thread Mikera
I tend to agree.

However it is worth noting that there are some libraries in the Clojure 
ecosystem e.g. Om and stuartsierra/component that do expect users to 
interact directly with protocols as part of the public API. So this doesn't 
seem to be yet adopted as a universal rule.

On Sunday, 28 December 2014 15:50:06 UTC+8, Jozef Wagner wrote:
>
> Protocols should never ever be part of public API. Protocols can be part 
> of the SPI, if custom extensions are to be supported. Otherwise they are an 
> implementation detail. See Rich's talk at 4:30 http://vimeo.com/100518968
>
> Jozef
>
> On Sun, Dec 28, 2014 at 8:11 AM, Mikera  > wrote:
>
>> That depends if the protocols are part of your user-facing API or not - a 
>> lot of the time I find that protocols are best hidden as implementation 
>> details rather than exposed to users.
>>
>> In core.matrix, for example, users never see the protocols directly: only 
>> implementers of new matrix libraries need to care
>>
>> On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>>>
>>> Changing old protocol names should trigger a major revision change in 
>>> the minimum because it breaks backwards compatibility. 
>>>
>>> --Ashton 
>>>
>>> Sent from my iPhone 
>>>
>>> > On Dec 27, 2014, at 11:18 AM, Michael Klishin  
>>> wrote: 
>>> > 
>>> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com) 
>>> wrote: 
>>> >> clj-time seems to be naming protocols inconsistently. It uses   
>>> >> ISomething, Something and SomethingProtocol naming. 
>>> > 
>>> > I suspect it is because it has 60 contributors and most users never 
>>> have to 
>>> > extend the protocols. 
>>> > 
>>> > Feel free to submit a PR that standardises all names on Something. 
>>> > --   
>>> > @michaelklishin, github.com/michaelklishin 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> > Groups "Clojure" group. 
>>> > To post to this group, send email to clo...@googlegroups.com 
>>> > Note that posts from new members are moderated - please be patient 
>>> with your first post. 
>>> > To unsubscribe from this group, send email to 
>>> > clojure+u...@googlegroups.com 
>>> > For more options, visit this group at 
>>> > http://groups.google.com/group/clojure?hl=en 
>>> > --- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Jozef Wagner
Protocols should never ever be part of public API. Protocols can be part of
the SPI, if custom extensions are to be supported. Otherwise they are an
implementation detail. See Rich's talk at 4:30 http://vimeo.com/100518968

Jozef

On Sun, Dec 28, 2014 at 8:11 AM, Mikera 
wrote:

> That depends if the protocols are part of your user-facing API or not - a
> lot of the time I find that protocols are best hidden as implementation
> details rather than exposed to users.
>
> In core.matrix, for example, users never see the protocols directly: only
> implementers of new matrix libraries need to care
>
> On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>>
>> Changing old protocol names should trigger a major revision change in the
>> minimum because it breaks backwards compatibility.
>>
>> --Ashton
>>
>> Sent from my iPhone
>>
>> > On Dec 27, 2014, at 11:18 AM, Michael Klishin 
>> wrote:
>> >
>> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com)
>> wrote:
>> >> clj-time seems to be naming protocols inconsistently. It uses
>> >> ISomething, Something and SomethingProtocol naming.
>> >
>> > I suspect it is because it has 60 contributors and most users never
>> have to
>> > extend the protocols.
>> >
>> > Feel free to submit a PR that standardises all names on Something.
>> > --
>> > @michaelklishin, github.com/michaelklishin
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clo...@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with
>> your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+u...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>> > ---
>> > You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to clojure+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Mikera
That depends if the protocols are part of your user-facing API or not - a 
lot of the time I find that protocols are best hidden as implementation 
details rather than exposed to users.

In core.matrix, for example, users never see the protocols directly: only 
implementers of new matrix libraries need to care

On Sunday, 28 December 2014 02:32:44 UTC+8, Ashton Kemerling wrote:
>
> Changing old protocol names should trigger a major revision change in the 
> minimum because it breaks backwards compatibility. 
>
> --Ashton 
>
> Sent from my iPhone 
>
> > On Dec 27, 2014, at 11:18 AM, Michael Klishin  > wrote: 
> > 
> >> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef@gmail.com 
> ) wrote: 
> >> clj-time seems to be naming protocols inconsistently. It uses   
> >> ISomething, Something and SomethingProtocol naming. 
> > 
> > I suspect it is because it has 60 contributors and most users never have 
> to 
> > extend the protocols. 
> > 
> > Feel free to submit a PR that standardises all names on Something. 
> > --   
> > @michaelklishin, github.com/michaelklishin 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
>  
> > Note that posts from new members are moderated - please be patient with 
> your first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to clojure+u...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Ashton Kemerling
Changing old protocol names should trigger a major revision change in the 
minimum because it breaks backwards compatibility. 

--Ashton

Sent from my iPhone

> On Dec 27, 2014, at 11:18 AM, Michael Klishin  
> wrote:
> 
>> On 27 December 2014 at 19:10:38, Jozef Wagner (jozef.wag...@gmail.com) wrote:
>> clj-time seems to be naming protocols inconsistently. It uses  
>> ISomething, Something and SomethingProtocol naming.
> 
> I suspect it is because it has 60 contributors and most users never have to
> extend the protocols.
> 
> Feel free to submit a PR that standardises all names on Something. 
> --  
> @michaelklishin, github.com/michaelklishin
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Michael Klishin
On 27 December 2014 at 19:10:38, Jozef Wagner (jozef.wag...@gmail.com) wrote:
> clj-time seems to be naming protocols inconsistently. It uses  
> ISomething, Something and SomethingProtocol naming.

I suspect it is because it has 60 contributors and most users never have to
extend the protocols.

Feel free to submit a PR that standardises all names on Something. 
--  
@michaelklishin, github.com/michaelklishin

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Jozef Wagner
clj-time seems to be naming protocols inconsistently. It uses ISomething,
Something and SomethingProtocol naming.

On Sat, Dec 27, 2014 at 4:20 PM, Matching Socks 
wrote:

> In the interest of thoroughness, it should be noted here that a protocol 
> *named
> "InTimeUnitProtocol" *appears in the ChangeLog referenced in the recent
> announcement of clj-time <
> https://groups.google.com/forum/#!topic/clojure/rKKOkj-qKvc>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-12-27 Thread Matching Socks
In the interest of thoroughness, it should be noted here that a protocol *named 
"InTimeUnitProtocol" *appears in the ChangeLog referenced in the recent 
announcement of clj-time 
.  

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-09-06 Thread Jozef Wagner
Clojure API exposes types to the user (Agent, Ref, Var, ...), so it is
benefical to see on the first glance whether the name is of a type or
interface/protocol. If the API would be built solely on the
protocols/interfaces, those prefixes would be of less use.

Moreover, I think that names of types should be nouns (e.g. Atom) and
names of protocols should be adjectives/verbs (e.g. ICounted), with
the exception of protocols which represent an abstract type (e.g.
IPersistentList)

Jozef

On Sat, Sep 6, 2014 at 6:40 PM, Bobby Eickhoff  wrote:
> What might be an advantage to using something like the I-prefix?  At first
> glance, this appears to be unbeneficial hungarian notation.
>
> Aesthetically, this seems backwards (to me).  I want interfaces and
> protocols to have the most readable names.  I'm willing to concede on less
> readable names for concrete implementations.  Many implementations and
> participants will even be anonymous.
>
> On Friday, September 5, 2014 5:52:48 AM UTC-4, Dave Sann wrote:
>>
>> I saw a comment on protocol naming here:
>> https://groups.google.com/d/msg/clojure/A4xIitQWloU/6E4xHDTPPaIJ
>>
>> there is nothing in the coding standards:
>> http://dev.clojure.org/display/community/Library+Coding+Standards (are these
>> maintained?)
>>
>> is there any sensible consensus on good naming convention?
>>
>> IBlah
>> PBlah
>> BlahP
>> Blah
>> ...other
>>
>> ...doesn't matter
>>
>> Dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-09-06 Thread Bobby Eickhoff
What might be an advantage to using something like the I-prefix?  At first 
glance, this appears to be unbeneficial hungarian notation.

Aesthetically, this seems backwards (to me).  I want interfaces and 
protocols to have the most readable names.  I'm willing to concede on less 
readable names for concrete implementations.  Many implementations and 
participants will even be anonymous.

On Friday, September 5, 2014 5:52:48 AM UTC-4, Dave Sann wrote:
>
> I saw a comment on protocol naming here: 
> https://groups.google.com/d/msg/clojure/A4xIitQWloU/6E4xHDTPPaIJ
>
> there is nothing in the coding standards: 
> http://dev.clojure.org/display/community/Library+Coding+Standards (are 
> these maintained?)
>
> is there any sensible consensus on good naming convention?
>
> IBlah
> PBlah
> BlahP
> Blah
> ...other
>
> ...doesn't matter
>
> Dave
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-09-05 Thread john walker
As you demonstrated, P, I or nothing is up to taste. The only consensus I 
know of is camel case.

https://github.com/bbatsov/clojure-style-guide#CamelCase-for-protocols-records-structs-and-types

On Friday, September 5, 2014 2:52:48 AM UTC-7, Dave Sann wrote:
>
> I saw a comment on protocol naming here: 
> https://groups.google.com/d/msg/clojure/A4xIitQWloU/6E4xHDTPPaIJ
>
> there is nothing in the coding standards: 
> http://dev.clojure.org/display/community/Library+Coding+Standards (are 
> these maintained?)
>
> is there any sensible consensus on good naming convention?
>
> IBlah
> PBlah
> BlahP
> Blah
> ...other
>
> ...doesn't matter
>
> Dave
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how do you name your protocols?

2014-09-05 Thread Jozef Wagner
I use IBlah (camel cased, prefixed with capital i) in both Clojure and
ClojureScript.

It looks better than PBlah and is consistent with how ClojureScript
names its protocols.

Jozef

On Fri, Sep 5, 2014 at 11:52 AM, Dave Sann  wrote:
> I saw a comment on protocol naming here:
> https://groups.google.com/d/msg/clojure/A4xIitQWloU/6E4xHDTPPaIJ
>
> there is nothing in the coding standards:
> http://dev.clojure.org/display/community/Library+Coding+Standards (are these
> maintained?)
>
> is there any sensible consensus on good naming convention?
>
> IBlah
> PBlah
> BlahP
> Blah
> ...other
>
> ...doesn't matter
>
> Dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.