|
Re: Lack of extension
|
Posted: Mar 2, 2007 5:30 AM
|
|
> > I'm not suggesting that we all program in Lisp, but the > > Lisp inspired languages like Smalltalk, Ruby etc do > seem > > to point the way forward. Static typing is the last > > argument for languages like Java and C#. But this can > be > > added to Smalltalk/Ruby/Python etc without affecting > their > > dynamic runtime nature. > > Actually, I think Objective C offers a better solution -- > static typing with dynamic binding. Essentially Obj C > allows you to type an object reference as (void *), in > which case the compiler doesn't attempt to resolve any > method references for that object. All method invocations > are resolved dynamically, even for statically typed object > references. That opens the door to additional flexibility, > such as adding methods to an existing class at compile > time, as discussed earlier in this thread. > > Various optimizations (such as caching method selectors) > can be done to reduce a lot of the overhead of dynamic > lookups. NeXT claimed to have reduced it below 15%, which > seems a reasonable price to pay for the added flexibility. > (Plus, in performance critical sections of code, you could > always get a pointer to the actual method implementation > and invoke it directly.)
Objective C is a move in the right direction. Mac OS X Cocoa GUI is built using it and the Mac GUI is definately sexy! The big vendors chose to back C++ instead of Objective C and the rest is history.
Personally, my take is that Objective C was a good compromise back in the day when 64M was a lot of memory on a PC. As I understand it, it is not VM based (so no mobile code) and it lacks Garbage collection.
With the machines of today why not go one better, like Smalltalk? :^)
Paul.
|
|