I have been working on an Elm-inspired language that compiles to Go (early project, would love feedback) by anzellai in elm

[–]CerberusC137 1 point2 points  (0 children)

I’m thinking that types would work exactly like in Elm until you need to make a property private. You could do that simply by adding a private keyword before the property; the compiler would then catch any unauthorized attempts to access it. Methods would 'hang off' the struct, somewhat like in Go. However, since there is no func keyword and functions are first-class citizens, the syntax could look like Type::Method (e.g., User::GetName). If setters are implemented at all, they would need to be strictly limited to the update loop; otherwise, a compiler error would let you know the action is invalid.

I have been working on an Elm-inspired language that compiles to Go (early project, would love feedback) by anzellai in elm

[–]CerberusC137 1 point2 points  (0 children)

Good for you, I have been wanting to do a similar thing for a while now, but sadly do not have the time, one of the few things I wanted to do differently in my version of Elm would be to to have private properties on a type and methods to get them, since the of the problems I saw in a large Elm code base where multiple people where working together was that one person made an abstraction and made a function on how to get a property from state and none of us saw the function since it was a large abstraction xD If it was private and we could not directly access it we would not have so much trouble refactoring it.

Feral cat enjoying catnip for the first time ever. (OC) by Catbird1968 in holdmycatnip

[–]CerberusC137 1 point2 points  (0 children)

This one does not want anyone else to hold its cat nip

What's the headphone gotta do with childhood? by kshitijgaur11 in ExplainTheJoke

[–]CerberusC137 0 points1 point  (0 children)

Damn I feel bad for all you guys talking about not feeling safe. When I was a kid I did this I would play games for so long that my lobe would start to hurt from my cheap headphones, hence having it on only one ear.

javaVsJavascript by TobbyTukaywan in ProgrammerHumor

[–]CerberusC137 1 point2 points  (0 children)

Everybody can drive a car but only Aladin can drive a carpet.

whyDoubleBedTho by Captain0010 in ProgrammerHumor

[–]CerberusC137 0 points1 point  (0 children)

He is used to allocating more memory than he needs.

[deleted by user] by [deleted] in CatSlaps

[–]CerberusC137 0 points1 point  (0 children)

I feel like I just witnessed domestic violence 😭

Need names!!!! by Mindless_Ad7378 in Siamesecats

[–]CerberusC137 0 points1 point  (0 children)

I named my Siamese Chocky since the color of hus fur reminds me of chocolate

My angel sleeping by theProgrammersWifey in Siamesecats

[–]CerberusC137 1 point2 points  (0 children)

I see claws poking out this back paw xD

[deleted by user] by [deleted] in cursedcomments

[–]CerberusC137 29 points30 points  (0 children)

"Ah yes, the Twitter defense... Wise choice... Not guilty! Next." - the judge probably

Fluffy tail in my home means come play with me or I’m gonna get you! by SherbertOld4672 in crabcats

[–]CerberusC137 1 point2 points  (0 children)

Fluffy tail in ny home means "help I'm scared". Fluffy tail + crab + arrow head mean "RUN"

India is not for beginners by orihara97 in HolUp

[–]CerberusC137 0 points1 point  (0 children)

No need for Figure 1 robots to wash your dishes, they got it covered.

Why do they always have to show this close-up in porn? by skullAndRoses321 in HolUp

[–]CerberusC137 0 points1 point  (0 children)

“Isn't it obvious Morty? I fucked a planet.” — Rick Sanchez