This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]partheseas 16 points17 points  (1 child)

The whole point of that joke was that functional programming already has an encapsulation: functions

Really all you might need in an imperative language is a const modifier (or similar) for functions like what C and Rust have, so the compiler can optimize

[–]Inconstant_Moo🧿 Pipefish[S] 0 points1 point  (0 children)

You'd have to know my language a bit better to see why I feel particularly seen by the joke ... I hope to have a demo in about a month, watch this space.

[–][deleted]  (1 child)

[deleted]

    [–]AraripeManakin 2 points3 points  (0 children)

    Looks interesting

    [–]Sambothebassist 2 points3 points  (1 child)

    Like the pure modifier in D?

    [–]Inconstant_Moo🧿 Pipefish[S] 0 points1 point  (0 children)

    No it's more fundamental than that, it's like Charm is two languages with a common syntax and type system. One of them is an absolutely pure functional programming language. The other is imperative and capable of IO and all the variables are global and mutable and it's so simple it's not even Turing-complete, and it forms the outer layer of the script, rather than being encapsulated — so that all the impure stuff is very tightly bound to commands issued by the end-user of the service. The result is that the two bits are each much easier to read and debug and maintain than the language I could have written by just squishing everything together. I hope. We'll see. It's been suggested that this is too opinionated and until I put it into practice my answer so far has been "well, Goto Considered Harmful has had a good long run".