On 12/07/2014 03:31 PM, Stefan Monnier wrote: >> That's a terrible idea. It makes it much harder to reason about the >> correct operation of programs, since now it makes it virtually >> impossible to implement find-definition functionality without lots of >> type inference. > > That's indeed the main problem, and I agree it's a serious one. > >> There's also the runtime overhead of dynamic dispatch. > > That's not relevant: one way or another there is dynamic dispatch, > regardless what system we use. That's not true: if we send messages to objects, we can only know the code to execute after examining the object. If we invoke functions directly, we know *statically* what code runs where. >> Common Lisp solved this problem 20 years ago with namespaces. We should >> just implement CL namespaces instead of trying to shoehorn Smalltalk >> into the language. Would you accept a CL packages implementation? > > Last time this was discussed (a year ago, maybe?), we neded turning it > down, mostly because `M-x grep RET' can't be used for find-definition > and find-uses. *Any* solution that frees developers from spelling all symbols in full will have that disadvantage. At least namespaces make it relatively symbol to determine the fully-resolved symbol from lexical context without requiring a full type inference pass.