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

  • Home
  • SEARCH
  • 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 6750619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:49:44+00:00 2026-05-26T12:49:44+00:00

I am designing an object-oriented programming language for the purpose of learning. The language

  • 0

I am designing an object-oriented programming language for the purpose of learning. The language has properties, like this:

Class Fruit:
  Property ReadWrite Float weight
  Property WriteOnly Integer someWriteOnlyProperty # <-- avoid?

Should I add the option for write-only properties or will this only lead to bad design decisions in programs using this language?

  • 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-05-26T12:49:45+00:00Added an answer on May 26, 2026 at 12:49 pm

    By all means design write-only properties – just be aware they are of limited use (if you are only going to write to it and never expose it, why have a property?).

    Might as well use a simple method instead. This will reduce any confusion of those using your code.


    Java and .NET do have write only properties, so there are precedents.

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

Sidebar

Related Questions

When designing a class that has a reference to another object it might be
I'm a relatively newbie to object oriented programming in JavaScript, and I'm unsure of
I'm writing a class library that provides convenient object-oriented frontends to the C API
I am designing a viewmodel object in knockout that has an observable array. When
I'm trying my hand in designing an application in JavaScript that is object oriented
I am designing a flash website and I made it object oriented. I have
I'm currently enjoying the transition from an object oriented language to a functional language.
I'm designing my own programming language (called Lima, if you care its on www.btetrud.com),
I watched this presentation about object oriented css , but I think I either
Designing forms has always been fun, but getting them to send email on the

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.