[Pharo-dev] Smalltalk = strongly typed

kilon thekilon at yahoo.co.uk
Sat Aug 3 14:53:30 EDT 2013


btc wrote
> btc@

>  wrote:
> 
> Kilon, I agree with most of you writeup, except that I think Smalltalk 
> has types - except the types are not associated with variables, rather 
> they are associated with objects.  This aligns with Igor's comment  "in 
> smalltalk, assignment is not copying value, but changing the reference".

Actually I also mostly agree with Igor point. If I am not mistake we agree
on the fact that smalltalk has no types. 

The only thing I would not agree, if my assumption is correct here, is that
Igor appears here implying that smalltalk somehow is special to assign
values by reference. If this assumption of mine is correct then I do
disagree strongly , its actually a very common practice. Python also
implement this, Lisp does, ruby and an array of dynamic type languages. I am
not so sure about C and C++ but since they use pointers its a moot point
anyway. 

I explain this concept in my book about python that I have published in
blenderwiki , section "Reference" which can be found here ->
http://wiki.blender.org/index.php/User:Kilon/Python_book_of_magic/05.Dictionaries

However this concept is implementation specific and not language specific.
Its obviously a massive diffirence because a coder rarely worries about the
implementation itself the same way a user of an OS does not worry how and
why an OS does the things it does, he only care about what it does.

Also I am not sure how that prove the existence of types, for me it does
not, it only describes how values are assigned. What prevents you from
assigning by reference typeless data ? 

Unless once again we talk about how pharo itself implement this and somehow
uses its own internal type system. The question that remain why I the coder
should care about this , if at language level Smalltalk is typeless. 

Maybe Igor can clarify this more to make a more clear picture what happens
at implementation level. But at language level yes I have seen nothing that
proves the existence of types inside Smalltalk unless we treat types in a
very vague kind way which for me it just defeats their purpose. 

I also agree on the remark of Duck Typing , it definitely smells like
smalltalk , but once again the terminology is failed because it implies a
type system. 

Once more I have to stress the importance of dichotomy between language
specification and language implementation. Types obviously touch both areas
but not necessarily for same reasons.





--
View this message in context: http://forum.world.st/Smalltalk-strongly-typed-tp4701894p4702028.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




More information about the Pharo-dev mailing list