Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 130751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:59:51+00:00 2026-05-11T05:59:51+00:00

I have to implement a set of 60 functions, according to the predefined signatures.

  • 0

I have to implement a set of 60 functions, according to the predefined signatures. They must be global functions, and not some class’s member functions. When I implement them, I use a set of nicely done classes provided by 3rd party.

My implementation of most functions is quite short, about 5-10 lines, and deals mostly with different accesses to that 3rd party classes. For some more complicated functions I created a couple of new classes that deal with all the complicated stuff, and I use them in the functions too. All the state information is stored in the static members of my and 3rd party’s classes, so I don’t have to create global variables.

Question: Would it be better if I implement one big class with 60 member functions, and do all the implementation (that is now in the global functions) there? And each of the functions that I have to write will just call to the corresponding member function in the class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:59:51+00:00Added an answer on May 11, 2026 at 5:59 am

    All the state information is stored in the static members of my and 3rd party’s classes, so I don’t have to create global variables.

    That is the keypoint. No, they should definitely not be put into classes. Classes are made to be used for creating objects. In your situation, you would use them just as a scope, for the data and functions. But this is what namespaces already solve better:

    namespace stuff {     ... 60 functions ...     namespace baz {         ... if you want, you can have nested namespaces, to ...         ... categorize the functions ...     }      namespace data {         ... you can put data into an extra namespace if you want ...     } } 

    Creating classes that consist purely only of static members is a bad idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Python 2.6, with the set() builtin, not sets.set. I have defined some custom
I have to implement an application in which I have set small edittext for
I have big set of urls and I want to implement an autocompletion. I
I am trying to implement Parse Push Notifications. I have it all set up
clients :has_many :project,:roles I have implement but its not a good implementation..
I have a set of measurements done regularly, but some are missing: measurement_date value
Let's say I have to implement a piece of T-SQL code that must return
I have written a set of javascript functions that allow me to validate user
I'd like to be able to call some member functions from different classes which
I have a class, say class AddElement{ int a,b,c; } With methods to set/get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.