Mort vs Elvis

9/28/2003 12:14:00 PM

Mort vs Elvis

Someone commented that personas, Mort and Elvis, don't really matter much for VB and C#, because the two languages are essentially isomorphic.

Personas are used to focus the product on the typical type of customer; this makes the product more focused and improves the design. Instead of building for all types and satisfying none.

Personas do overgeneralize. There are experts that use VB and there are non-CS Types that use the C#. We don't deny they exist; we don't zero in on those developers, when we design software.

I do think that Personas matter. With the current version of VS.NET, in which C# and VB.NET are similar, I doubt Personas were used. The consequence was that there was a lot of resistance from VB6 people to move to VB.NET (or "Visual Fred", which some have derided it as). Other VBer's took the jump, but found that language was harder to use, in contrast to C++ and Java developers moving to C#, who found the language much easier to use.

There are a few people like Mort, opting for C# believing the syntax changes are largely cosmetic, but that the pay is higher, but are surprised by some of the philosophical differences between VB and C#.

The difference between VB.NET and C# currently is mostly syntactical; however, that is due to integration with CLR. VB.NET is still somewhat lax with optimizations in many places, so there are some performance hits: Boolean to int conversions, And/Or shortcircuiting, Late-Binding, Checked arithmentic, No Pointers, etc. VB.NET acts like a type-less language, by default.

VB has default parameters and late-binding, and is willing to compromise performance for ease of use. VB also has a support library. This is in line with Mort's prior experience.

Mort, not having much computer science background and not understanding what's under the hood, is not going write some fancy classes, but is going to reuse a lot of existing components via OLE Automation in the system; hence, the need for late building, and default parameters which are common when programming against ActiveX control or Word's object model. He doesn't have the patience or expertise to code his own.

C# has pointers, typerefs and additional unsigned data types (which you can still get in VB, just by referring to the System types names). The pointers do allow an additional level of control. Elvis is more likely to build lots of classes and develop full applications from scratch. Elvis also doesn't want to lose some of the controls like pointers he had in C++.

The object model that Mort is used to is a componentized WHOLE-PART heirarchy beginning with the either top level object called Application (or the Application's name like Access, Excel, and so on). For example, Word.Application.Documents("Untitled").Paragraph(1).Centered = true. The notion of namespaces is unfamiliar. As a co-developer of Excel, I remember thinking that VBA had a concept of an object model, but no concept of inheritance.

Elvis is more familiar with the standard IS-A heirachy, that is presented by .NET namespaces. That was what existed in C and C++ and Java.

I think we will be to see some real divergence in Whidbey, moving closer to the typical user as represented by the persona, refining the personalities of the three languages VB, C#, and MC++.

In VB, Microsoft announced in VS Live, the addition of the My hierarchy, that simulates the componentized WHOLE-PART heirarchy that is more familiar to VBers. My.Computer.Files, My.Printer.Settings, etcs... It also introduced the compiler's ability to spell and "grammar" check VB code. It brings back Edit-N-Continue, removing the distinction between Run-Time and Compile-Time, that never existed in the first place in VB6. While these are desirable for (and possibly may also be available in) C#, the initial inclusion in VB indicates more hand-holding for VB developers.

The new C# features are primarily focused with enhancing design of code. New C# provides developers with refactoring for improving the design of classes. In addition, we see features enabling cleaner programming patterns such as anonymous methods(closures) and iterators (co-routines).

Interestly, the changes in VB seeks to remove abstractions, while the changes in C# encourages it. Now, that's a big difference.






Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media