Smalltalk for C programmers?!

Torsten.Bergmann at phaidros.com Torsten.Bergmann at phaidros.com
Tue Jul 11 07:22:06 UTC 2000


Andreas Raab wrote:
>Just wondering: Has anyone out there seen C# (C-sharp) yet?! I stumbled
over
>it while looking for something completely different and it looked very much
>like a Smalltalk for C/C++ programmers. Anyone seen more?! If so, what's it
>like?!


Hi Andreas,

C# (C sharp) is a mix from J++, C, C++, VisualBasic, Pascal and Smalltalk.
It supports multiple inheritance for interfaces and single inheritance
for classes and namespaces. It supports garbage collection, but you
can use pointers, ... (you can mark such code with an "unsafe" keyword)

Nobody really knows what it is, citation from the language reference:
	
	"C# is a simple, modern, object oriented, and type-safe programming
language"
	"C# is a procedural language, ..."

It's again file based (*.cs extension), you can use a compiler (csc.exe) to
create
executables. It's a typed language, but you can use basic types like
objects.
You can lock an object (mutal exclusion), access native code and it will
be much easier to deal with COM than with C/C++.

2 Small examples:
=================

	using System;
	class Hello
	{
	static void Main() {
		Console.WriteLine("Hello, world");
		}
	}
	
----------------------------------------------------------------------------
--

	[COMImport, Guid("00020810-0000-0000-C000-000000000046")]
	class Worksheet {}
	class Test
	{
		static void Main() {
			Worksheet w = new Worksheet();	// Creates an Excel
worksheet
		}
	}

More Infos:
===========
Main Page
http://www.msdn.microsoft.com/vstudio/nextgen/technology/csharpintro.asp
Language Reference
http://msdn.microsoft.com/vstudio/nextgen/technology/csharpdownload.asp

Bye
Torsten







More information about the Squeak-dev mailing list