views:

301

answers:

4

So, I'm looking at using Smalltalk/Squeak for a couple of hobby/academic interest projects, and while trying to read up on the language I came across this nice article. However, this paragraph had me a bit dumbfounded:

"Unfortunately, there is a complete lack of standardization for providing or dealing with modules/packages in Smalltalk. Some dialects provide very strong, comprehensive support for modules/packages (including versioning and distributed access by programming teams,) and other dialects provide little or nothing in this regard. Some dialects provide a robust implementation of multiple, shareable namespaces, others don't. The only commonality is that, when either modules/packages or namespaces are provided, they are implemented as reified objects, in the same way that classes and methods are implemented as reified objects."

So, I have tried googling for it, and this shows up on the Squeak wiki: http://wiki.squeak.org/squeak/734. Does anyone know if this (or something similar) is now part of the standard distribution?

+2  A: 

Namespaces are not part of Squeak today. But it's a common agreement to prefix all classes of the own project with two or three letters. That's not as save as real namespaces, but it's leightweighted, simple, and works. +smile+

Mue
+8  A: 

As Mue says, it is not perceived as a big problem in the Squeak community. Prefixing is "good enough". A while back I tried hard to do something better and still maintain the unique feeling of Smalltalk:

http://swiki.krampe.se/gohu/32

...but even though lots of people thought it was nice it didn't catch on. Code more or less works though, but there are several other approaches too - unfortunately most of them just copy some stupid approach from a lesser language thus destroying the feeling of Smalltalk.

That was quite neat, Göran! I will take a deeper look at your Parser/Scanner/Encoder modifications.
Eyvind
+1  A: 

Sounds like you should check out Newspeak.

Yardena
+1  A: 

The Google Summer of Code supported a namespace project called Environments. Chris Cunnington is currently investigating it, but he says it looks promising.

Frank Shearar