I understand the concept of algebraic data types, but I don't see in what context they are useful or when they would be beneficial. When should I consider using them and how are they useful in functional programming? Would they be of any use in object-oriented programming? What are some of the main benefits they have to offer? Thanks.

  • 3
    \$\begingroup\$ this sounds like a language theoretic (i.e. computer science) or just a programming question. It's not about electrical engineering, so this is not the right place to ask about it. \$\endgroup\$ Nov 13, 2020 at 21:06
  • \$\begingroup\$ Other than that, your question is really far too broad even for computer science or programming stack exchange sites. You need to ask a specific question, so I'm not proposing to migrate this somewhere else, I'm afraid. \$\endgroup\$ Nov 13, 2020 at 21:07
  • \$\begingroup\$ This is EE; not the best place for this question. I have seen Haskell being used for hardware description (CλaSH), but that is a bit of a stretch as an argument for keeping this question here. \$\endgroup\$
    – ocrdu
    Nov 13, 2020 at 21:07
  • 1
    \$\begingroup\$ Post this in Stack Overflow with context. ESE may not be the suitable place for this question. \$\endgroup\$
    – Mitu Raj
    Nov 13, 2020 at 21:53
  • \$\begingroup\$ @retardedguy, Do you mean ADT (Abstract Data Type)? My favourite language is functional programming, and I am a huge fan of LUA. I have been using ADT for at least two decades, in both Software Engineering and Hardware Engineering, when doing System Integration and TDD (Test Driven Development). Let me give an example, SDM (Structured Development Methodology is used Info System Engineering, SSADM, involving both computer computer software and hardware). The idea is used since the Stone Age, used to be called "Divide and Conquer". In software engineering it is called "Structured Programming", \$\endgroup\$
    – tlfong01
    Nov 13, 2020 at 22:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.