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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:54:31+00:00 2026-06-09T23:54:31+00:00

So I have a couple methods in my class that return NSDictionary has a

  • 0

So I have a couple methods in my class that return NSDictionary has a response.
The issue is, returning NSDictionary doesn’t really tell you what the dictionary holds.

I feel as if another programming wanted to use my class, he/she would find it troublesome to understand exactly what kind of information a particular method returns.

My question is: Is this considered bad programming design? Classes should be self-explanatory and reusable.

Or is this considered ok since you can determine what keys a dictionary holds, and as long as the keys are descriptive enough, it should be self-explanatory?

  • 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-09T23:54:32+00:00Added an answer on June 9, 2026 at 11:54 pm

    If it’s a concrete, recurring data representation, then you should really consider using a class to represent this data.

    Is this considered bad programming design?

    It can be, or a dictionary can be the best solution in some cases. It really depends on the data you return, and how it affects the client. If you can simplify the program (in the big picture) by creating a class to represent this data, then the dictionary is surely the wrong solution.

    A typical indication is the noise the client goes through when receiving your data — do they need to do a bunch of dynamic key and type testing all over the place? Then it is likely a good candidate that your program can be simplified and easier to maintain if it is represented as a proper class.

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

Sidebar

Related Questions

I have a abstract base C# class with a couple of methods that has
I have a Wifi class that has a couple of broadcast receivers that listen
Consider situation when we have a class with couple of static methods that use
I have a couple extension methods that handle serialization of my classes, and since
I have a couple of classes that share a common base class, with the
I have a couple of standard ASP.NET web methods that I'm calling from javascript
I have a class that is only ever accessed externally through static methods. Those
I have a couple of methods I'd like to share between models rather than
I have couple of dozen pieces of data that I need to save and
I have couple resource DLLs that I currently load when application starts using following

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.