From: Phlip Date: 2005-09-17T04:36:36+09:00 Subject: Re: you can't get in trouble with your boss for picking C# Josh Charles wrote: > My Point was that you still need to use C (a _strongly_ typed > language) at some point, or else you can't do what you want to do. I > was still reacting to the guy that flat out said that stronly typed > languages were just wrong. First, some guideposts. C is weakly statically typed. Ruby is strongly dynamically typed. Ada is strongly statically typed. Perl is weakly dynamically typed. Next, some definitions. "Strong" means you cannot glom two variables together and the compiler will "guess" how to resolve their types. Perl is "weak" when it lets you do this because in Perl everything is a string, so every activity that's not obviously math can resolve to a string manipulation. "Dynamic" means all objects inherit from a great Object in the sky, which virtually contains every possible method. So the line foo.bar() will compile and run for any foo of any type that contains any bar(). "Static" means the compiler trivially checks at compile time that all use of foo.bar() use a foo that refers to an object of a class in the same inheritance hierarchy. bar() must only bind to a single root bar() that all variations must derive from. > My entire point is that your should use > the best tool for the job. it would be bad idea to implement > something like basecamp in C. It would also be a bad idea to > implement the latest NVidia 3D device driver in Ruby. Totally. The closer to the metal, the more you need a strong statically typed language. (C, a weak language, squeaks by because everyone who learns it knows how to use it strongly.) The closer to the user, the more you need a strong dynamic language, for the command-and-control stuff. Note that the popular ORBs (CORBA, ActiveX), are strongly dynamically typed, regardless of the languages that support them. I forgot what I wrote, but what I meant was "static typing is wrong". Hacks like generics are attempts to put "a little" dynamic typing into static typing languages. Static typing should be optional, and it should not be an excuse not to write unit tests. They make static typing less important for robustness. -- Phlip http://www.greencheese.org/ZeekLand <-- NOT a blog!!!