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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:56:30+00:00 2026-05-11T02:56:30+00:00

I a modeling a system to evaluate expressions. Now the operands in these expressions

  • 0

I a modeling a system to evaluate expressions. Now the operands in these expressions can be of one of several types including some primitive .NET types. When defining my Expression class, I want some degree of type-safety and therefore don’t want to use ‘object’ for the operand object type, so I am considering defining an abstract Operand base class with nothing in it and creating a subclass for each type of Operand. What do you think of this?

Also, only some types of operands make sense with others. And finally, only some operators make sense with particular operands. I can’t really think of a way to implement these rules at compile-time so I’m thinking I’ll have to do these checks at runtime.

Any ideas on how I might be able to do this better?

  • 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-11T02:56:30+00:00Added an answer on May 11, 2026 at 2:56 am

    How about Expression in 3.5? I recently wrote an expression parser/compiler using this.

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

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer — is wrong. When you use numeric character references, the… May 11, 2026 at 11:18 am
  • added an answer Use the width and precision specifiers, set to the same… May 11, 2026 at 11:18 am
  • added an answer Python's string format method can take a format spec. >>>… May 11, 2026 at 11:18 am

Related Questions

I a modeling a system to evaluate expressions. Now the operands in these expressions
I will participate a modeling competition, which spends three days. I need a language
I am modeling a class diagram. An attribute of a class is an enumeration.
I'm writing a structural modeling tool for a civil enginering application. I have one
I want to create a very basic 3D modeling tool. The application is supposed
Let's say I am modelling a process that involves a conversation or exchnage between
Not quite an Attribute, not quite a Method. Stereotypes? <<get>> <<set>> ? I'm retro-modelling
I a have a multithread application (MIDAS) that makes uses of windows messages to
Currently this expression I ([a-zA-z]\d]{3} returns when the following pattern is true: I AAA
The only reliable method that I a have found for using a script to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.