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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:52:31+00:00 2026-05-12T22:52:31+00:00

I’ve decided to build a database tracking the credit card offers I get in

  • 0

I’ve decided to build a database tracking the credit card offers I get in the mail, and one confounding factor has been how to represent the offers. With minimum finance charges and variable rates and mimimum variable rates it gets a bit more complex than “10.99 percent”. I’ve decided I need to construct a language to represent these things if I have a shot at comparing or trending these offers.

The question is, how do I represent this? The formulas are far too complex to model by creating fields, so I’ll just store the formula in the DB in all it’s glory. Yes, this means blurring the line between data and execution, but since this is a personal project I’m not so worried.

  1. Embedded python. Represent the formula as Python and just bind relevant variables and call the formula.
  2. Use a Domain Specific Language. I can’t be the first person to think of representing things this way, and in fact I know I’m not. Are there any free, public languages that can represent this?

Can anyone offer advice on which approach is 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. Editorial Team
    Editorial Team
    2026-05-12T22:52:32+00:00Added an answer on May 12, 2026 at 10:52 pm

    This sounds somewhat similar to the work by Simon Peyton Jones et al. on representing financial contracts using combinator libraries, including an implementation in Haskell, including the ability to run evaluation functions over them to compute the value of the contract given some model. I don’t know enough about finance to tell you if this is exactly what you’re looking for, but it sounds like it’s in the right ballpark.

    As to your specific question, I generally prefer embedded domain specific languages (that is, DSL-like constructs embedded in a host language, such as Ruby with its object oriented metaprogramming, Scheme with its macros, or Haskell combinator libraries), since it give you the full power of the host language for free; usually when writing a domain specific language with its own syntax, execution model, runtime, and so on, you run into things that would be easy to do if you had an existing language available, but are a pain to deal with since you haven’t implemented something in your DSL.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
In my XML file chapters tag has more chapter tag.i need to display chapters

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.