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 8388623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:30:43+00:00 2026-06-09T18:30:43+00:00

I usally code in C and C++ where implementation and declaration are in different

  • 0

I usally code in C and C++ where implementation and declaration are in different files (.c/.h and .cpp/.hpp), but I often code in Haskell/Python/D where this distinction does not exist.

My problem is when my code tends to grow I struggle to have a clear vision of what is inside a file. I miss the “you know what to expect just by looking at the .h” and tend to become overwhelmed by the feeling of mess.

My best attempt to solve this is to put fold into the file, but I would like to know how do you do guys? Do you have some magic solutions that I haven’t tried yet? Is that just a set of mind?

  • 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. Editorial Team
    Editorial Team
    2026-06-09T18:30:44+00:00Added an answer on June 9, 2026 at 6:30 pm

    I don’t think there are magic solutions, but the following tips might work

    • Use classes
    • Describe for each class their resonsibility
      • Write down which data is used in each class
      • Write down which functionality is used in each class
    • Start with small classes, they will grow eventually
    • When classes getting too big, split them.
    • Use one file per class.
    • Split methods/data in public/private (with the use of the convention _)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been seeing code like this usually in the start of header files:
In my implementation files (.cc files), I often find that it's convenient to define
When performing many inserts into a database I would usually have code like this:
When I select an element by name in Javascript, I usually use this code:
For this code example below, usually I would use [self fall]; instead of the
enter code hereI have a basic question regarding an implementation using a Axis2 web
I have some fundamental points/questions about OpenGL, not all involving code but concepts as
I've tried all sorts of design approaches to solve this problem, but I just
I have been writing command-line Python scripts for a while, but recently I felt
I've been struggling with the following code. It's an F# implementation of the Forward-Euler

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.