Reddit: why aren't people using D?

Leandro Lucarella llucax at gmail.com
Fri Jul 24 07:55:48 PDT 2009


Rainer Deyke, el 23 de julio a las 19:49 me escribiste:
> Walter Bright wrote:
> > Rainer Deyke wrote:
> >> Syntactic ambiguity.  Confusion between an instance of a class and a
> >> reference to that instance.
> > 
> > I was initially thrown by this when I started some Java programming. But
> > it soon became clear this was an advantage, and I came to prefer it.
> 
> I like it in Python, where all variables are references.  Java is
> similar to Python in this regard, although the existence of primitive
> value types complicates the situation somewhat.
>
> I don't like it in D, where reference types and value types coexist.  I
> especially don't like it in templates in D, where it may not be clear if
> you're dealing with a reference type or a value type until instantiation.

!? It's true that in Python all are references, but there are inmutable
objects in Python, like int, float, strings and tuples. From a practical
POV it exactly the same as value types, if you do:

def f(x, y):
	x = 5
	y = (1, 3)

a = 1
b = (5, 9)
f(a, b)
print a, b

prints "1 (5, 9)", not "5 (1, 3)".

So I can't see how you like Python's way and not D's way.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
En la calle me crucé con un señor muy correcto, que habitualmente anda en
Falcon; iba corriendo con dos valijas en la mano y dijo: "Voy para Miami,
tiene algún mensaje o ..." y le dije: "No, no, no..."
	-- Extra Tato (1983, Triunfo de Alfonsín)



More information about the Digitalmars-d mailing list