Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #7725

Re: Function naming scheme

Path csiph.com!aioe.org!.POSTED!not-for-mail
From Victor Porton <porton@narod.ru>
Newsgroups comp.programming
Subject Re: Function naming scheme
Date Wed, 19 Apr 2017 22:54:35 +0300
Organization Aioe.org NNTP Server
Lines 17
Message-ID <od8fad$1fpk$1@gioia.aioe.org> (permalink)
References <od8ban$180m$1@gioia.aioe.org>
NNTP-Posting-Host HO54yo/wQJHrp4blb7RQ6A.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Complaints-To abuse@aioe.org
User-Agent KNode/4.14.10
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.programming:7725

Show key headers only | View raw


Victor Porton wrote:

> I have two sets of similar (for pairings of functions from the different
> sets) functions: one for single orders and one for basket orders.
> 
> Should I name the functions like ProcessOrder/ProcessOrderBasket or
> ProcessOrderSingle/ProcessOrderBasket?

Now I've understood that I can do both using only "basket" set of functions. 
I can just pass NULL as the basket ID and a single order info to a function.
A little if-else (checking if the basket is NULL) for differentiating 
singular and basket orders should do the job.

Feeling stupid for not noticing this before.

-- 
Victor Porton - http://portonvictor.org

Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Function naming scheme Victor Porton <porton@narod.ru> - 2017-04-19 21:46 +0300
  Re: Function naming scheme Kaz Kylheku <686-678-9105@kylheku.com> - 2017-04-19 19:25 +0000
    Re: Function naming scheme Victor Porton <porton@narod.ru> - 2017-04-19 22:37 +0300
      Re: Function naming scheme Kaz Kylheku <686-678-9105@kylheku.com> - 2017-04-19 20:18 +0000
        Re: Function naming scheme Victor Porton <porton@narod.ru> - 2017-04-19 23:43 +0300
  Re: Function naming scheme Victor Porton <porton@narod.ru> - 2017-04-19 22:54 +0300

csiph-web