Thread

AW SDK C# port (Sdk)

AW SDK C# port // Sdk

1  |  

andon13

Dec 1, 2000, 2:11pm
First off I'd like to make those who are not already aware (people living
under rocks, etc...) that Microsoft's Visual Studio .NET is in BETA right
now. It includes a major new feature for C / C++ oriented programmers!

The feature is of course the new language derived from C++ called:
C# (Pronounced: C Sharp)

+ The closest thing to 100% OOP (Object Oriented Programming) I have ever
seen... It goes so far into Object Orientation that it actually gets rid of
Global Objects and Macros!

+ New file format (.cs)... This file format is like a combination Header /
Implementation file. You define and actually implement the entire class
within this file rather than having to use a header and then using #include
in your implementation file.

+ Memory Garbage Collector... Appropriately named, this feature takes RAD
(Rapid Application Development) to new levels by completely automating all
memory allocation, etc... This sounds like the greatest thing since sliced
bread until you realize the way this is done for the most part is by getting
rid of pointers!!! Use of pointers will flag your code as "Unsafe" to the C#
compiler and it will completely disable the Garbage Collector allowing you
to completely screw up your stack and heap (just as easily as you could in C
and C++).

+ Standard Libraries replaced with BCL (Base Class Library), primarily
because the std. libs were comprised almost entirely of global objects and
macros =P

+ Error codes are for the most part indicated using the good ol' TRY / THROW
/ CATCH methods first seen in C++. What this really means is that because
the BCL, which is essentially the Standard Libraries from C++ re-written
using classes is designed to throw exceptions rather than return a non-zero
integer or handle when an error occurs. Because of this, programmers who
rarely used the TRY / THROW / CATCH methods find themselves forced to use
TRY and CATCH to detect when a function did not run successfully. It is
believed that once these programmers begin to learn how to use TRY, THROW
and CATCH that they will write the majority of their code using THROW
instead of returning non-zero integer error codes. At least that's what was
said on news://msnews.microsoft.com/microsoft.public.dotnet.languages.csharp
(Very good resource for learning the language) and it's available to the
public, that is to say Non-BETA testers.

+ New variations of some of the old loop keywords, such as ForEach <--- I
have yet to find a use for that one, but that's not to say it's useless.
Once you understand that all the loop keywords actually compile the same
EXACT way when converted to assembly you really don't care much about
variations... Sure For is much easier than using While when you want to
perform the same action every time the loop reaches the end of its brackets,
but it's completely possible to do it with While, and it compiles the same
exact way regardless of which method you use, it's just displayed as fewer
lines of code BEFORE being compiled.

+ Namespaces have a practical use in C#! The BCL uses different namespaces
for different portions of it... For instance the pre-processor command
"#using Console" would tell the compiler to essentially do an "#include
<Console.h>" if you want to relate it to C++. As stated above there are now
such thing as header files in C#, that is why namespaces essentially replace
them.

+ C# can be used to write programs for ANY Microsoft OS other than DOS. This
is due to the fact that C# has native support for CLR, which stands for
(Common Language Runtime). From what I have gathered thus far it appears to
be COM's (Component Object Model) replacement for the new .NET OSes
(Whistler and Blackcomb) and any other OS with CLR manually installed.

+ C# is still evolving! Currently there's nothing really exciting for C#
other than native support for the .NET framework, CLR support, being almost
completely object-orianted, garbage collector and some new data types. But
because it is not a standard language at the moment (such as ANSI C++) it
will most likely continue to evolve until ANSI or some other organization
decides to make a standardized version of it.



Now that we have that long and boring list of advantages for using C# out of
the way, we can actually talk about porting the AW SDK to C# rather than
simply being a C library!

In order to do this, you would first need to create an object-oriented
version of the AW SDK. This has in fact already been done. I forget who the
creator of it is, however... In any case, it should be fairly simple to
create classes containing functions which encapsulate all of the AW SDK
functions...

If you successfully port the SDK, you should end up with a (.cs) file with
several classes that encapsulate all AW SDK methods and throw exceptions
rather than returning non-zero integer values for errors. By having your C#
port throw exceptions when an SDK error occurs instead of checking the
integer return value every time you perform an AW SDK function you can
reduce the number of lines of code needed to accurately debug you
application as well as make your code easier to read!

I am in the process of attempting a C# port for the AW SDK and my BOTs right
now... If I manage to finish mine before someone more experienced than me
comes along and does it better, I will post my results here for you all to
use...


Best Regards,
Andon "The Code Master" Coleman
CodeMaster at Nothing-Inc.com

Senior Programmer
R&D

Nothing, Inc.
http://www.nothing-inc.com/ -- "We put the nothing in NULL"

john viper

Dec 2, 2000, 9:38pm
<READ THIS FIRST>Okay after reading this over I just want to make it clear that there is nothing
personal against Andon -- he is just one of the unfortunately millions of programmers who will be
lead astray by this revolutionary new idea which Microsoft has completely stolen from Sun
Microsystems. Also, the first part of this is basically telling exactly what was stolen from whom.
If you don't want to take the time to read the whole thing, Please scroll down to the bottom and
read my note to C++ programmers thinking about upgrading to C#. Thank you. We now return you to
your regularly scheduled rant post...

Damn, I was afraid it would happen. Microsoft can finally legally become a monopoly with this
fucking stupid "subscription software" idea of theirs. Well anyway -- thanks for the opportunity to
give everyone the REAL facts in C#!! Here it goes..........................

| + The closest thing to 100% OOP (Object Oriented Programming) I have ever
| seen... It goes so far into Object Orientation that it actually gets rid of
| Global Objects and Macros!

Hmm... Apparantly you have never seen Java. Ever since Java 1.0, there are no global objects or
methods or anything and Macros... the entire preprocessor is eliminated.

| + New file format (.cs)... This file format is like a combination Header /
| Implementation file. You define and actually implement the entire class
| within this file rather than having to use a header and then using #include
| in your implementation file.

*ahem* again... see Java... Microsoft is such a wannabe. I wouldn't be suprised to see exact
duplicates of Java's source in C#'s.


| + Memory Garbage Collector... Appropriately named, this feature takes RAD
| (Rapid Application Development) to new levels by completely automating all
| memory allocation, etc... This sounds like the greatest thing since sliced
| bread until you realize the way this is done for the most part is by getting
| rid of pointers!!! Use of pointers will flag your code as "Unsafe" to the C#
| compiler and it will completely disable the Garbage Collector allowing you
| to completely screw up your stack and heap (just as easily as you could in C
| and C++).

You are kidding me, right??? Come on Microsoft... why not think up something ORIGINAL?????

Hmm alrighty... well ok so as far as I can tell the whole damn programmign language is a ripoff of
Java, amongst other things! Lets take a look at this one:

| + New variations of some of the old loop keywords, such as ForEach <--- I
| have yet to find a use for that one, but that's not to say it's useless.

Oh foreach is BEAUTIFUL!!! Basically, lets give an example. You give foreach an array, and it
loops through each cell until the end and you can manipulate stuff with this information. Yes this
is so useful -- when I write PERL SCRIPTS I use it all the time.

| + C# can be used to write programs for ANY Microsoft OS other than DOS.

Sorry, I just had to pick this one out. What an origional idea, making a programming language where
you can write software on all <b><i><u><blink><hey look here>MICROSOFT</blink></u></i></b> operating
systems. That is so nice of them to provide this convenience!! Hey heres a good idea: How about
make it work on ALL operating systems? Yeah! What an incredible thought! It could work on all
your OS'es too, but ALSO on things like Linux, Mac, Solaris,........ Microsoft: drive through,
champ!

A note to you C++ programmers who want to move to C#, please read this before you spend too much
money on something you can get for ABSOLUTELY 100% PERFECTLY IN EVERY WAY FREE. You probably want
to upgrade to C# because it is the "next step up" from C++. However, as with EVERY software product
that is EVER released (even I am not perfect) the first few versions are loaded down with bugs. We
will probably have to wait upwards of 5 years for Microsoft to work the kinks out of C# (and
inherantly YOUR software). C# is basically Java for Microsoft OSes. Why not get the real thing?
Why not go to http://java.sun.com/products and get Java? "But I don't have time to learn an
entirely new language," you say. Java's syntax is based on C++. That much is the same, and syntax
is 50% of learning a language. Also, think about this. In C#, everything is an object. There is
no more preprocessor. So forth and so on. You don't think you won't spend a good month or two
learning C# (thats about the time I spend learning the basics of Java -- and I had NEVER used C++
before.)? I guarantee you that you will. If you want more details on Java or its relation to C#
please feel free to E-Mail me at ticklejw at jtsoft.net. It might save you millions.

And beforw you ask, no, Sun is not paying me to type this (although if I sent it to them it mighe
get me a contract on a commercial ;-). Myself (Jeffrey W. Tickle) as well as JTSoft.net are not in
anyway associated with Sun Microsystems (besides the fact that we love their programming language),
and this is all based on my own research and experience.

Have a nice day and happy holidays :-)

_________________________
John Viper
http://www.jtsoft.net
"Java is a machine. You put Java code in one end, and money comes out the other." - Anonymous

grimble

Dec 4, 2000, 8:54am
Its really spooky to see my initial thoughts (that went through my head
while I was reading the first post) be reflected so closely in someone elses
hand.

Are you telepathic JV? Have to agree with everything you say here. M$ are
providing nothing new to the development community, they're just scared that
they are losing their position as the supplier of the "language of choice"
for serious development. If people are doing their jobs right, commercial
projects now consider C++ vs Java (and any other suitable languages) for new
OO developments and select the right one on its merits. C++ is a little
short of merits nowadays in comparison to Java.

All M$ have done here is make themselves look a little silly in my view.

Grims.



[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn