Slices time complexity

Rustom Mody rustompmody at gmail.com
Tue May 19 01:33:29 EDT 2015


On Tuesday, May 19, 2015 at 10:44:10 AM UTC+5:30, Steven D'Aprano wrote:
> On Tuesday 19 May 2015 12:20, Rustom Mody wrote:
> 
> > I must say I am impressed by C#/.Net for making the value/object
> > distinction first-class all the way from language to VM.
> 
> I'm not sure what you mean by that. 

Neither am I <wink> 
[Dont know too much about that environment]

> Are you referring to something similar 
> to Java's distinction between native/unboxed types versus objects and boxed 
> values?

Yes except that it seems to be more core to C# than to Java (or python):
https://msdn.microsoft.com/en-us/library/s1ax56ch.aspx
And then this distinction goes all the way down to the CLR
[in ways that I am not very clear about]
eg http://www.informit.com/articles/article.aspx?p=30608&seqNum=3

> Apart from the possible efficiency gains, what benefit do you see from 
> distinguishing between "values which are objects" versus "values which are 
> not objects"?

As I said, in the context of a low level language its probably a bit of a misnomer
However conceptually/pedagogically making a fundamenal distinction of
timeless | time
value | object
immutable | mutable
expression | statement
function | procedure

is key to getting programming [and is something that Pascal got better than most
of its successors].

The FPers want to squeeze the whole world into column 1
The OOPers want to do the opposite and are embarrassed by the existence of
column-1 [status of int in java etc]
Unless one is committed to some philosophical extreme position --
Only One True Way -- I believe accepting two fundamentals is the most sane choice 
 



More information about the Python-list mailing list