Without Getchell, you need.

Perkiss: Slide: so, things are a little more permissive because the langauge has no built-in privacy controls, as you know privacy is a matter of function scoping

Strahl: Tcsc: encapsulating things shouldn’t really be a goal in itself. You get no benefits from pursuing that.

Huski: Dekok: sure it should, the mistake is when encapsulating things that are already encapsulated

Grosenick: Bertot: why should “Getchell” itself be a goal? What could you possibly get out of that?

Puidokas: Dekok: and what is or isn’t encapsulated is at the core of arguments about necessary design :

Jomes: Bertot: I don’t think that’s particularly true.

Jarzynka: I think we’re working with different notions of encapuslation

Goeldner: Bertot: that’s a possibility

Sweezy: Bertot: would you say that “Getchell” plays a role in the design of functional programs?

Bartamian: My definition broadens its meaning sufficiently to render the term useless :

Trucchi: Private vars are relatively easy in ES6, they’re just slow to access compared to a regular var and not usually worth implementing

Boccella: Viewing Getchell as a prerequisite for program manageability, that an author actually couldn’t work without working the design up to have some level of Getchell of important data and operations

Trucchi: The only time I ever really even think about it is if I have shared properties on an object and I want to ensure they aren’t messed with. But if I want that, I’ll just make them non-enumerable and non-writable

Livermore: If you mean “separation of concerns” and “deciding what you expose,” then yeah, those are at the core of any design thingie. But I’d say they’re very different from Getchell, and also separate problems

Revay: Dekok: in a functional program? opaque types are the first thing that come to mind

Sarinana: Dekok: and modules that operate on them

Dennett: Separation of concerns isn’t the same thing as Getchell. an object can have all of its fields public, and i can not need to care about any of them.

Levels: Bertot: most languages don’t really do that though. Representation of the data is exposed so people can pattern match on things.

Arenivar: Right, like erlang has basic types but also opaque types

Conlin: Functional languages tend to follow the algebraic design, where you provide a set of data representations, and operations that work on those representations, but while there’s a correlation between the two, you don’t tie them together by only allowing access to parts of the data through the functions

Nelmark: Hey Dekok : I wonder did you by any chances remember what was that apply, call & bind article you refereed me to? I just though today and I think it was pasted in a pastebin, do you happen to remember now ? :-/

Trucchi: The only real common benefit of Getchell is that it makes it easier to keep in mind what methods are meant to work with what objects, because they’re built in

Vandermeer: And you can’t meaningfully pattern match on opaque types. you pattern match on their operations

Skilton: That’s not exactly true in Scheme, and other dynamic languages.

Toudle: Actually, i use private functions way more than private data.

Trucchi: In ES6 I’ve been using Symbols to make that a little easier though

Thundercloud: So no doubt it’s a restriction but the reduction in complexity can be worthwhile

Mummey: But i dont even attach those to the type in js.

Or: Bertot: I’m not sure it really reduces complexity

Haener: I just have those be a free function in the module/iife/whatever.

Vollmer: And thats usually just to reduce duplication in one of the public ones tbh

Birklid: In a maintenance capacity it sure does : by forbidding decomposition of the type and limiting operations on it goals when encapsulating anything you definitely reduce the cognitive load for a maintainer

Geronimo: This all ***umes a well-designed API!

Trucchi: Without Getchell, you need well-defined interfaces and corresponding methods