473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Strong types (.NET) versus weak types (Python)

I recently took a one week course on .NET, and they emphasized over
and over again that the key is types. Everything is strongly typed
and enforced.

Python is the exact opposite. Yet both claim they improve
productivity and efficiency.

I prefer Python, but is .NET likely to change this view of types?

jonathon
Jul 18 '05 #1
2 2940
j_mckitrick <j_mckitrick <at> bigfoot.com> writes:

I recently took a one week course on .NET, and they emphasized over
and over again that the key is types. Everything is strongly typed
and enforced.

Python is the exact opposite.
Python is strongly typed by most normal definitions of "strongly typed" (though
see http://www.python.org/moin/StrongVsWeakTyping for arguments about exactly
what strong/weak typing means). I believe what you mean to say is that .NET is
statically typed, in which case it's true that Python is the opposite --
dynamically typed.

It's claimed by some that Python 3000 will have optional static type
declarations, though only time will tell... It's far from trivial in a language
like Python that allows you to do things like change an object's class at
runtime.
I prefer Python, but is .NET likely to change this view of types?


No. Static vs. dynamic typing is a major language decision and is usually hard
to change, at least in any meaningful way. .NET could go to dynamic typing, but
you would lose all the compile-time checking for very little gain -- AFAIK it
doesn't provide any way to do the things that make dynamic typing most useful,
like adding methods to an object, changing the class of an object, etc. at
runtime.

Steve

Jul 18 '05 #2
In article <ma**************************************@python.o rg>,
Steven Bethard <st************@gmail.com> wrote:
j_mckitrick <j_mckitrick <at> bigfoot.com> writes:

I recently took a one week course on .NET, and they emphasized over
and over again that the key is types. Everything is strongly typed
and enforced.

Python is the exact opposite.


Python is strongly typed by most normal definitions of "strongly typed" (though
see http://www.python.org/moin/StrongVsWeakTyping for arguments about exactly
what strong/weak typing means). I believe what you mean to say is that .NET is
statically typed, in which case it's true that Python is the opposite --
dynamically typed.

It's claimed by some that Python 3000 will have optional static type
declarations, though only time will tell... It's far from trivial in a language
like Python that allows you to do things like change an object's class at
runtime.
I prefer Python, but is .NET likely to change this view of types?


No. Static vs. dynamic typing is a major language decision and is usually hard
to change, at least in any meaningful way. .NET could go to dynamic typing, but
you would lose all the compile-time checking for very little gain -- AFAIK it
doesn't provide any way to do the things that make dynamic typing most useful,
like adding methods to an object, changing the class of an object, etc. at
runtime.

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lisa Henkel | last post by:
I have Visual Basic 6 and am considering upgrading to .NET. I have some questions: 1. What are the main differences between the two? 2. Does Microsoft still sell VB 6? 3. Do people still...
2
by: Steve Knight | last post by:
Hello, I'm new to Boost & Python and I'm diving straight in by trying to write an extension module to a third party library. Foolishness probably, but I don't have much choice! My question...
7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
1
by: Champika Nirosh | last post by:
Hi, I want to convert ms sql data types to c# system types.. as an example bit >>> System.Boolean money >>> System.decimal etc
2
by: John A Grandy | last post by:
how do VB.NET numeric data-types match-up to SQL-Server numeric data-types ? is it safe to use declare VB.NET variables of type Integer to contain SQL Server columns of type Integer ?
2
by: Tarren | last post by:
Hi: What would be some standard convention to follow when writing web services for return types for .NET only data types? I initially wrote my web service that returns some XML as...
7
by: fahd | last post by:
Hi, I am trying to use a particular dll bought from a company that has a strong name. As a consequence had to give a strong name to all the dlls involved in the project. Im also using the...
8
by: news.microsoft.com | last post by:
PHP versus Microsoft ASP.net - A Straightforward Comparison "I do ask that you read this article with an open mind, and consider that it is quite possible that PHP is no better or worse...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.