XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
=?UTF-8?Q?Re=3A_=5Bxml=2Ddev=5D_Special_case_code_is_evil_=E2=80=A6_properti?==?UTF-8?Q?es_of_programming_languages_that_enable_avoidance_of_special?==?UTF-8?Q?_case_code?=

On Fri, Jun 25, 2021 at 9:52 PM Roger L Costello <costello@mitre.org> wrote:

To recap:

  • Special case code is evil.
  • Are there properties that a programming language must possess that enable programmers to write code that is free of special case code?
  • Is it theoretically possible to never have to write special case code?

Are you suggesting that, control flow constructs like "if" in the programming languages should be deprecated? If that is so, I strongly disagree.

Please take for example, following logic (written in pseudo-code),

if (age < 15) {
     // do something
else if (age >= 15 and age < 30) {
    // do something different
}
else {
    // do something else
}

The above example, is a specific functional implementation driven by a real world requirement, that can only be implemented by programming constructs like "if".


--
Regards,
Mukul Gandhi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS