Programming Convention Survey of the day
-
CopyObjectArrayToRecord( array, record )
in addition, when using COM for IDispatch programming, the last parameter is usually used as the return value... so your convention follows a common practice.
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
-
WEllllll, for a modern language, I would expect CopyObjectArrayToRecord(object[], record) But, if I were in C (and not C++), I would fully expect it to be CopyObjectArrayToRecord(record*, object*), or more likely objrecncpy :) - Phil
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
1 makes the most sense, but the thing is written wrong in the first place. It should be: Array.CopyTo(Record r) and/or: Record.CopyFrom(Array a)
"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles. -
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
I expect #1. What makes most sense is to never allow a developer to make this decision in the first place. Class Record Copy(array) Parameter lists are evil, period.
Dwayne J. Baldwin
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
#1--What did I when? And are ya ever gonna tell us your point?
____________________________________________________________________________ "Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space." -- Douglas Adams -- Shohom67
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
What about make the whole signature (parameters names too) tell about semantic? CopyTo( Object[] source, Record destination ) This can be lighter to use: array.CopyTo( record ) my fear is that people tend abuse naming, I saw around names like: CopyFirstObjectArrayParameterToSecondRecordParameter :wtf:
pp
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
why isn't 2? I like 2!;P
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
As long as the types are different and the parameter names are sufficiently descriptive, I don't think it matters.
-
I want to know what makes most sense for developers: Before you arm yourself and point it to be a programming question let me say that this is not a programming question. I have a function named
CopyObjectArrayToRecord
, it takes two parameters: an object array and a record. Just based on the name what do you expect the order of parameters to be: 1. array, record 2. record, arrayCo-Author ASP.NET AJAX in Action
1 is more logical ;)
-
True that.
Zakk Of all Trades