Very nice paper (or should I say 'booklet'?)! A real "must read" for anybody attempting serious feature programming. The distinction between BasicTypes and normal objects is quite helpful. Although the reference based access to BasicTypes in the foreach-loop makes a lot of sense, it's something one has to be aware of in order make good use of it. I guess changing lists (deleting/adding items) in a loop is often a bad idea. In my experience it sometimes helps to start deleting items starting from the end. This way the behavious is usually much more predictable.
I really like the idea of getting rid of the possibility to change the parameters passed to a feature. That simply shouldn't be possible by default. If you really want to do that on special occasions maybe one can find a construct that explicitly passes "changeable" references. Like passing a value or a pointer in C/C++ for example. For performance reasons one probably shouldn't copy complex objects, but just disabling changes for the value passing style (as a standard) and enabling changes for the pointer passing case should do and would prevent many people from programming stupid things...
Type safe containers would be nice too. And, yes please implement a copying constructor / universal copying assignment if possible. That makes a lot of sense.
A Christmas present: Effective FPL
in Mr. Arne Bergmann's Blog
A blog by Mr. Arne Bergmann
Posted · Report reply
Hi Arne,
happy New Year!
Very nice paper (or should I say 'booklet'?)! A real "must read" for anybody attempting serious feature programming. The distinction between BasicTypes and normal objects is quite helpful. Although the reference based access to BasicTypes in the foreach-loop makes a lot of sense, it's something one has to be aware of in order make good use of it. I guess changing lists (deleting/adding items) in a loop is often a bad idea. In my experience it sometimes helps to start deleting items starting from the end. This way the behavious is usually much more predictable.
I really like the idea of getting rid of the possibility to change the parameters passed to a feature. That simply shouldn't be possible by default. If you really want to do that on special occasions maybe one can find a construct that explicitly passes "changeable" references. Like passing a value or a pointer in C/C++ for example. For performance reasons one probably shouldn't copy complex objects, but just disabling changes for the value passing style (as a standard) and enabling changes for the pointer passing case should do and would prevent many people from programming stupid things...
Type safe containers would be nice too. And, yes please implement a copying constructor / universal copying assignment if possible. That makes a lot of sense.
Regards,
Bodo