4 ms·
Howdy. Erlang's modules are involved in code namespace for the compiler & runtime (i.e., the 'M' of the 'MFA' triple of Module + Function name + Arity that nam
by scottlf 9y ago
Howdy. Erlang's modules are involved in code namespace for the compiler & runtime (i.e., the 'M' of the 'MFA' triple of Module + Function name + Arity that names a function) as well being the unit/scope/bound for hot code loading (i.e., you must load or unload an entire module at a time).
I've worked in Erlang-land far longer than I've lived in any OOP-land, so I'm not sure what you mean by enterprise'y OOP. Coincidentally, Pony's rules for "Packages" are something I just smacked my ignorant head against a few hours ago. The subsections of https://tutorial.ponylang.org/packages/ https://tutorial.ponylang.org/packages/ in the tutorial can probably answer at least some of your question: specifically "Package System" and "Use Statement".
- pdimitar 9y agoI'll take the liberty to speculate and assume your parent comment was asking if Pony classes have the same features as Java classes -- namely class-level attributes, instance-level attributes, different access levels to attributes and methods. Those things. So, does it?
- spooneybarger 9y agoPony classes have methods. Pony classes have fields. Fields and methods can be public or private. Private is akin to Java's package private. There are no instance variables.
- pdimitar 9y agoThank you. And structs / records? I mean, if there are no instance fields, there has to be some kind of constructs that emulate them.
- spooneybarger 9y agoSorry, I mispoke. There are no class fields. Only instance fields.