Structs (was RE: Record selectors)

Vlad Dumitrescu (EAW) <>
Fri Jan 17 10:22:48 CET 2003

> Hey :)  Sorry if this reply is a bit rambling, it prompted me 
> to get down some of my thoughts.

No problem, I see these discussions as brainstorming, and all ideas might trigger a better idea in someone else's head.
> Abstraction seems to take on a special meaning to some OO 
> folks - I have a
> hard time distinguishing it from encapsulation 90% of the time.  

I see abstraction in OO context as encapsulation+polymorphism. 

> If encapsulation isn't provided (as is the case with records), I
> find it important enough that I'll roll my own.  

One problem with encapsulating record accesses into functions is that if collides somewhat with pattern matching, and also if modifying more than one field, it is a less efficient than direct access. 
> An example of this sort of 'use processes for *everything*' approach might
> be a project I want to try sometime this year, that is, to write a digital
> circuit simulator in Erlang.  Instead of messing with nasty physics
> equations, I think the problem could be modelled with one process per gate
> (or chip). 

I have a (permanently ongoing :-) project where I would use Erlang processes to model real world objects, in a robotics environment. If you get started on your project, maybe you can let me know and we could see if we could help each other.

best regards,

More information about the erlang-questions mailing list