Linked by Eugenia Loli on Sat 15th Jul 2006 22:45 UTC
.NET (dotGNU too) Jeff Cogswell writes: "I'm about to make a confession. Even though I've written several books and articles about C++, I have a secret: C++ isn't my favorite language. I have lots of languages that I use, each one for different purposes. But the language I consider my all-time favorite is Python."
Thread beginning with comment 143595
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Pointless
by segedunum on Sun 16th Jul 2006 18:45 UTC in reply to "RE: Pointless"
Member since:

As a result, it is not a ".NET language"

It is written in C#, therefore it is. Yay! Let's use one .Net language to write a completely new language using the same .Net framework. Brilliant.

All that happens is that you go round in circles thinking that you're producing something different when in reality you're reproducing exactly the same thing.

or in more technical term, "CLS compliant".

It's written in C#, so it inherits CLS compliance in some way. I find the notion that somehow it isn't a .Net language and that it's somehow different rather silly. If you use the .Net framework and .Net data types then you are bound by their limitations, and that comes out in the language eventually. If you're not, then your interoperability suffers - which is no bad thing if you want a language that actually seems to do things differently. But since the point of .Net is interoperability......... ;-).

However, if you are merely reimplementing Python in C#, then you have to ask yourself if it wouldn't be more sensible just to use the regular C implementation of Python. And if you have to fully reimplement a language like Python, then that means your environment is not language neutral ;-).

This was discussed on a Python list some time ago:

Reply Parent Score: -2

RE[3]: Pointless
by TBPrince on Sun 16th Jul 2006 22:44 in reply to "RE[2]: Pointless"
TBPrince Member since:

The goal of ANY .NET languages is not to have a language per se but to allow access to .NET framework.

While most language implementations have macros (or sometimes libraries) which allow compatibility with popular constructs or functions, that's just an handy tool for legacy code which should be converted.

So the goal of IronPython is not to have a Python implementation per se but to allow people to use Python to code against the .NET framework. This won't be portable by definition, not as side-effect.

(Please notice that I'm not using Python but I'm using .NET framework)

Reply Parent Score: 1

RE[3]: Pointless
by n4cer on Sun 16th Jul 2006 23:44 in reply to "RE[2]: Pointless"
n4cer Member since:

It's written in C#, so it inherits CLS compliance in some way. I find the notion that somehow it isn't a .Net language and that it's somehow different rather silly.

Neither C#, C++/CLI, VB.NET, nor many other languages that target CLI/CLR are inherently CLS-compliant languages. Each language has features that violate CLS compliance rules, and their respective compilers do not check for CLS compliance by default. Unless you actually take the necessary steps to ensure that your code is CLS compliant, it likely is not.
See the following links and excerpts from MSDN.

Common Language Specification

"The CLS was designed to be large enough to include the language constructs that are commonly needed by developers, yet small enough that most languages are able to support it. In addition, any language construct that makes it impossible to rapidly verify the type safety of code was excluded from the CLS so that all CLS-compliant languages can produce verifiable code if they choose to do so."

Writing CLS-Compliant Code
Language Interoperability Overview
"Even though the runtime provides all managed code with support for executing in a multilanguage environment, there is no guarantee that the functionality of the types you create can be fully used by the programming languages that other developers use. This is primarily because each language compiler targeting the runtime uses the type system and metadata to support its own unique set of language features. In cases where you do not know what language the calling code will be written in, you are unlikely to know whether the features your component exposes are accessible to the caller. For example, if your language of choice provides support for unsigned integers, you might design a method with a parameter of type UInt32; but from a language that has no notion of unsigned integers, that method would be unusable."

Reply Parent Score: 2