[MUD-Dev] C# vs. LPC

Travis Casey efindel at earthlink.net
Tue Jun 27 19:04:04 CEST 2000


On Tuesday, June 27, 2000, Felix A. Croes wrote:
> Travis Casey <efindel at earthlink.net> wrote:
>> Tuesday, June 27, 2000, 12:18:02 PM, Christopher Allen <ChristopherA at skotos.net> wrote:

>> > I was wondering if there were any of you c language experts who could 
>> > compare and contrast Microsoft's new C# (cee-sharp) language with
>> > LPC.
>>
>> I'll take a quick shot at it.  Note that while I know LPC quite well,
>> all I know about C# is what I read on that page and in the two
>> documents that are downloadable from that page.

>>From what followed, I assume that the LPC dialect which you are most
> familiar with is the MudOS one.  (I make this point because I am
> cross-posting my response to the DGD mailing list, where Christopher's
> original posting also went.)

Yep, MudOS is what I'm most familiar with.

> C# has exception handling in the Java/C++ style, LPC's support for
> catching errors is rudimentary only.  Whether the more advanced
> style is also an improvement is perhaps a matter of taste.  Personally,
> I <hate> having to hunt through multiple catches to find out where
> the flow of control went.

I don't like catches either, but I do like try mechanisms -- they make
it much more apparent what's being done in case of an error.

>> It also provides namespaces, which allow programmers to have multiple
>> namespaces and specify which they are using.  Again, I don't see this
>> as likely to be a problem in a typical mud, especially when using LPC.
>> (You can't directly reference variables in other objects, so each
>> object already has its own namespace.)

> Interestingly, this is one of the things that make LPC such an easy
> language to work with.

I agree completely; it makes objects easier to maintain, makes it much
easier to check data that's coming in, and does other nice things.

>> Both languages allow multiple inheritance.  C# also has the idea of
>> interfaces, as in Java, and allows objects to implement multiple
>> interfaces.

> LPC has multiple inheritance.  C# has only single inheritance.

Are you sure?  The introductory doc that was there stated clearly that
it has multiple inheritance.  If it does only have single inheritance,
I'd consider that a major flaw/disadvantage.

>> Overall, they both seem to be headed in the same direction -- towards
>> a more object-oriented and "user-friendly" version of C.  If you're
>> building a mud, you might want the mud-oriented features of an LPC
>> implementation -- on the other hand, if you don't like how LPC
>> implementations handle those, you may not.

> DGD's dialect of LPC is definitely not headed towards a user-friendly
> version of C.  I very much doubt whether any other LPC dialect is,
> either.  I rather think C is where LPC started, and from which it is
> moving further and further away.

I should have written that differently -- I meant merely that having
such features as garbage collection, dynamically allocated arrays,
actual strings, etc. makes it easier for a non-expert programmer to
write useful programs.  Both C# and LPC are built along those lines.
And I certainly didn't mean to imply that they're trying to move
towards being more C-like -- maybe "extension" would be closer to what
I meant than "version".

--
       |\      _,,,---,,_    Travis S. Casey  <efindel at earthlink.net>
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'
     '---''(_/--'  `-'\_)      





_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list