Re: Java versus Python

  • From: "black ares" <matematicianu2003@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 21 Jun 2011 17:53:18 +0300

default parameters are in dotnet from dotnet 2.0 and c# 2.0.

----- Original Message ----- From: "Christopher Coale" <ccoale427@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, June 21, 2011 5:08 PM
Subject: Re: Java versus Python


Not to be picky, but let me correct you on that. Named arguments are a feature of C# 4.0, not .NET 4.0. You can use named arguments using .NET 1.1 if you wish, so long as you use Visual Studio 2010 (in order to use C# 4.0).

On 6/21/2011 6:52 AM, Jamal Mazrui wrote:
I think reasoned debates on these topics are appropriate for this list, as long as we avoid getting personal.

I'm curious -- does Java have optional and named arguments like Python? I think these are generally a superior way of overloading functions as compared to defining multiple functions with the same name but different parameter types. It took until version 4 of the .NET Framework for these to be added as capabilities that a .NET language can use.

I also think it is worth pointing out that Python generally assumes interfaces rather than data types. So, any type supporting, say, the iterable interface, can be passed to a function that relies on that capability, be it a string, list, tuple, etc. If the object passed does not support the expected interface, a runtime error occurs.

Jamal

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: