CURL review request

Jacob Carlborg doob at me.com
Wed Aug 17 09:44:01 PDT 2011


On 2011-08-17 09:13, Jonathan M Davis wrote:
> On Wednesday, August 17, 2011 09:01:02 Jacob Carlborg wrote:
>> On 2011-08-16 22:01, Jonathan M Davis wrote:
>>> On Tuesday, August 16, 2011 18:47:44 Jacob Carlborg wrote:
>>>> BTW, do we have style guides for abbreviations like this?
>>>
>>> No. The style guide says camelcase, but it doesn't specify how to deal
>>> with abbreviations. Personally, I think that it should be dealt with on
>>> a case by case basis, since what works best depends on the
>>> abbreviation, but in general, I prefer all caps.
>>>
>>> - Jonathan M Davis
>>
>> There's also the question when having abbreviations in a method name:
>>
>> sendToHTTP
>>
>> or
>>
>> sendToHttp
>>
>> In general think abbreviations should be avoided except when the
>> abbreviation is better known, e.g. HTTP, FTP and so on. I like camlecase
>> better than all caps both for class names and method names.
>
> I meant that I generally prefer all caps for the abbreviations (e.g.
> sentToHTTP rather than sendToHttp). I definitely think that the function names
> should be camelcased and the types should be pascal cased - which is what the
> d style is. And yes, abbreviations should only be used when they're
> appropriately clear. Function names should be as short as we can reasonably
> make them and still have them be clear, but clarity ranks higher than brevity
> when it comes to picking good function names IMHO.
>
> - Jonathan M Davis

Ok, seems we agree.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list