Ernst recommends (like all other sane people):
> My suggestion: stick to simple OO ;o)

+1

There are a ton of reasons to this rooted in theoretical stuff like GC and
memory management, the dangers of overruns and corruption when dealing with
raw buffers, etc.

Let me add a practical reason related to the way the solution models the
real world, where the COBOL-esque solution is demonstrably incorrect.

In some cultures, e.g., China, the family name goes in front of the given
name. My wife's family name is "Yu", and her parents named her "Cen". In
China, she's known as "Yu Cen".

In a design where the memory representation matches the output, you are
absolutely unable to handle issues like this. In the example, the problem is
cultural, but in the real world such alternate rules happen all the time (as
much as we hate it).

So if you write your C# in C#, you'll wind up with something like

        public string FullName
        {
            get
            {
               if ( address_country == "CHINA" )
                  return surname + " " + name;
               else
                  return name + " " + surname;
            }
        }

If you write your C# in COBOL, you can't really accomplish this at all.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to