I am a bear of very little brain but recently, during a prolonged wrestling 
match with the type system in Visual Basic for Application' I think I had an 
interesting idea namely that Types, per se, are a case of premature 
optimisation.

It seems to me that Types come with a whole host of hidden assumptions which 
are difficult or impossible for a programmer to modify or maniplulate. Having 
played a little with nim for some Advent Of Code problems I thought nim might 
be a good candidate for opening up what makes up a type.

So instead of Types being black boxes what if they were replaced by collection 
of policies and the issue of how many bits to used to implement those policies 
being wholly transferred to the responsibility of the compiler.

The policies would be very simple things like that describe what operations may 
be performed on a block of memory

• Writable • readable • persistent • PositionalSymbols ' each symbol in a 
literal is x times the one to the left • SequenceSymbols ' a symbol array/list 
• SymbolEnum(Unicode,Ansi etc etc etc) • Incrementable (also means 
decrementable) and so on.

I'll go get my coat.........

Reply via email to