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]
Re: [xml-dev] Michael Kay: simple designs make easy things easier,difficult things more difficult

On 12 November 2013 13:36, Costello, Roger L. <costello@mitre.org> wrote:
> Michael Kay wrote:
>
>> I think they made it simple deliberately,
>> knowing full well that when you keep a
>> design simple, you make easy things easier,
>> and difficult things more difficult.
>
> That is a fascinating statement.
>
> I am very interested in seeing concrete examples of a simple design making difficult things more difficult.
>
> Does anyone have examples of this please?
>
> /Roger

function parameters?

//Easy (prototype level)
function  create_user(  login, password ) { .... }

// v1.0
function  create_user(  login, password,  name, profile ) { .... }


// v3.0
function  create_user(  login, password,  name, profile,  system,
machine,  lang, is_admin, is_sysop,  listObservers, accesers,
multiplayRoles ) { .... }

// v9.0
* insert monstruosity here *

at some point, adding more parameters make the function unusable,
better use some structure, oop, or any other solution

create(  {  name: port.Name, profile: port.defaultProfile, lang: "en_EN" } );
create(  {  login: "reserver", is_systemcreated: true } );



Bonus reference:
"databases" made of hashes key / value, that have grown to gigabytes of data.
phone = ["aud_aux_DOCTOR_phone_" . id_doctor ]

* sounds of fear *


[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