On 3/24/07, Tony Lofthouse <[EMAIL PROTECTED]> wrote:
> David Clarke wrote: > I have 18 points at www.rccconsulting.com/aihal.htm and an explanation for > each one. Prove to me that this list of features can all be accommodated > by > any existing computer language and I will stop my development right now > and > switch. > David, your full list of requirements is completely provided by C# and .NET. See below for point by point matching: 1. Object Oriented As a modern OO language C# supports encapsulation, data hiding, polymorphism, etc, blah, blah, blah
Check. You also get some variety through third party languages such as Python and Cobra in case you have different preferences or needs.
2. All Classes, Methods, Properties, Objects can be created and changed easily by the program itself. .NET provides in depth reflection capabilities that provide this capability. You can also construct code at run time using various approaches from high level code to MSIL.
I'm familiar with .NET and C# and don't believe it to be the case that classes can be changed easily, or even changed at all. In Python, for example, I can add a method to an existing class: def hello(self): print 'hello' SomeExistingClass.hello = hello But I know of no .NET equivalent. If you do, please share. .NET *does* have full introspection and you can generate new classes. But it's still very static oriented and not nearly as convenient as Python, Ruby or LISP when it comes to these things. Of course, you could use IronPython on .NET. But generally these flexible languages are slower to some degree than the less flexible ones like C#. (When modifying a class in IronPython, it will be a slower Python style class, not a C# class that you are modifying.) My ultimate point is that David could be creating a language that is simultaneously close to C#'s performance and close to Python's runtime flexibility. Although we'd need more details (like benchmarks and sample programs) to be able to tell. Self modification is really core to his beliefs about AI so this alone could be reason to reject C#. However, it may not be reason alone to reject Python, Ruby, LISP or Smalltalk.
3. Efficiently run many programs at the same time. There is in depth support for multi tasking at the process and thread level. This includes multithreaded debugging. This is in part dependent on the OS but that's not an issue with Windows or Linux.
This point is debatable based on what you define as "many". My understanding is that popular operating systems don't take kindly to tens of thousands of parallel activities (whether you try processes or threads). People who need or at least badly want an *extreme* degree of parallelism may be interested in Stackless Python which provides "microthreads" for exactly this purpose. http://www.stackless.com/ Again, David's system may provide microthreads or something analagous and allow more fine-grained parallelism than .NET. (I came back up to this. The more I think about your strong requirements for self modification and extreme parallelism, the more I think you should look at Stackless Python. Even if you don't use it, you may get some useful info from it.)
4. Fully extensible. .NET is fully extensible through the addition of class libraries.
Agreed. There are also other interesting hooks in .NET including CodeDom, LINQ, DLL loader hooks and more. It's a very attractive aspect of the platform!
5. Built-in IDE (Interactive Development Environment) that allows programs to be running concurrently with program edit, compile and run. A number of IDEs are available. The Microsoft IDE supports real time update of variables during debug sessions. As well as the language being fully extensible the IDE is also fully extensible.
Mostly true. But the IDE doesn't allow quick "edit and continue running" in any usable sense. There *is* something like this in Visual Studio 2005, but it refuses in many cases to let me keep the program up and running when I go to change code. However, I think it's debatable to spend time building a new IDE to fix this one flaw. Microsoft may very well improve this area with the next release and you'd still be playing catch up with your IDE on all the other features and bugs.
6. As simple as possible. This is of course an unknown. That said C# has been designed to be as clean a language as possible. It is type safe, has very good garbage collection, and a minimal syntax that is very familiar to C/C++ and Java programmers.
This one is harder to comment on, but certainly C# is much cleaner than C++.
7. Quick programming turnaround time. If you mean compile time then C# compiles in a JIT environment so is very quick, especially incremental builds.
Some caveats here: C# has decent turnaround time, but Python, Ruby and Smalltalk do much better (and Smalltalk from both a language *and* IDE perspective). I find that people that haven't spent serious time with these have no idea what they are missing. Also, database coding in C#/.NET is still not as quick as the good ol' days when, as Anders Hejlsberg (creator of C#) put it, "data was easy". For certain kinds of apps, FoxPro and Clarion do better (but then aren't easy to extend into other areas). To its credit, Microsoft admits this problem with .NET and is working on it with LINQ: Language INtegrated Query.
8. Fast where most of the processing is done. C# is almost as efficient as C++. Where speed critical components are needed you can drop into unmanaged mode for high performance.
Totally agree. I gained an 18 X speed up from porting a financial app from Python to C#.
9. Simple hierarchy of Classes and of Objects. What is a simple hierarchy? If you mean the library classes then it is as simple as you want to make it. There is a rich set of class libraries that you can utilise but you don't have to.
Agree. .NET supports inheritance from the get go. And while the .NET base class libary could use some refinement here and there, it's a pretty good library. Supporting multiple inheritance of classes (rather than interfaces) would have been nice. I'll be adding this to Cobra in the future. And before you tell me "multiple inheritance is the root of all evil", I used to agree. Then I used Python. Now I miss it when I'm in C# and Cobra. Beware ranting below!
10. Simple Class inheritance. C# uses single inheritance rather than multiple inheritance. This greatly simplifies class design. Interfaces are provided to support those cases where multiple inheritance would have been used. IMO this is much better approach.
It's a MUCH worse approach! Microsoft can *never* add a convenience method to IList because interfaces cannot have code. Consequently additions would...(drum roll please)...break all programs in existence! For example, they cannot add a Sort() method which is missing from IList<T>. Let's say you write a method takes an IList parameter (because you don't want to lock someone into an array vs. a List vs. a List<T> vs. their own class). How do you sort the list you receive??? The answer: You sort it by writing some ugly ass code. "Ugly" as in "not the usual OOP--list.sort()--but some other junk". There's even multiple choices for the ugly code you will write, so no two people will do it the same. Blek! Class extensions in the next version of C# mitigate this to some extent, but overall, adopting Java's dumb design of "classes and interfaces" was a flat out mistake. While many people are emotionally traumatized by using multiple inheritance (MI) in early versions of C++ (I know I was), there are examples of MI done right or at least done "well" (Python and Eiffel).
11. Simple external file architecture. This is dependent on the OS but at the simplest you have text files. At the other extreme you have RDBMS.
Yeah, I don't know what this point is getting at. David you may want to expand on this for our understanding.
12. Finest possible edit and compile without any linking of object modules. There are no object modules as such in .NET. Classes are grouped into namespaces and then libraries. Each library is a .DLL which is directly callable from the code.
.NET is productive overall, but having used Smalltalk I know that .NET cannot boast this point. But I question if the cost of building the whole system from scratch is worth it to get this.
13. Scalable to relatively large size. C# is industrial strength. There are no limitations on current hardware. You can develop fully distributed apps across multiple domains if you can afford the hardware :-)
Agreed.
14. Built in SQL, indexes, tables, lists, stacks and queues. Microsoft's version of C# ships with SQLSERVER RDBMS (single user, 3 conections), all common data structures are available as class libraries. SQL syntax is now built right into the language with C# 3.0 (currently in beta). You can use SQL to access all data containers not just SQL RDBMS.
Agreed.
15. Efficient vector handling of all data types. Again this is handled via class libraries.
Also, low level arrays offer even better performance (but less usability) than the high level collection classes. So you have some choice, which is good. You can also drop down to pointers if you want to get medieval.
16. Internet interface. Yes, it's a standard class library.
Yep. Example here: http://cobralang.com/samples/Download/ Most of the source is docs and command line arg processing. The core part is a one liner: WebClient().downloadFile(url, localFileName) And you can put the contents to memory if you prefer.
17. Runs on Windows PC machines. Yes. It also runs on Linux as Mono. There is a good IDE available for Gnome.
Yep, runs on Windows. :-)
18. Can run as multiple separate systems on the same computer or in the background You can run multiple instances of the IDE on the same computer. You can build applications that are services that will run as a service background task.
Agreed. So .NET's not perfect, but it has a lot of great things going for it. AdaptiveAI chose it for their AGI which is furiously being worked on by multiple developers. They have consistently reported being happy with that choice. So even if you need to make a new language, it's could be worthwhile to leverage .NET. As one example, it has machine code generation written by pros that is easy to leverage. Another example: it has a garbage collector that performs well and requires zero effort to leverage when making a new language. But I don't know what would be involved in getting microthreads to work on .NET or if anyone is doing research on the issue. That investigation is really low on my list. -Chuck ----- This list is sponsored by AGIRI: http://www.agiri.org/email To unsubscribe or change your options, please go to: http://v2.listbox.com/member/?list_id=303
