Fork me on GitHub
#off-topic
<
2020-08-05
>
sveri11:08:00

I still remember how I learned about scala round about 2008-2009 and went to the scala irc to ask a question. And while most of my interactions back then with the community were pretty standard that one time I had a guy tell me in a very rude way to RTFM. While I can totally live with this answer it was his tone and arrogance that turned me away from that specific IRC and in a sense from scala too for some time. In hindsight it was a really bad experience for me that kept my brain thinking for many months if I was really that stupid as he made it sound. It's absolutely fine to tell someone to read the docs, especially if the question is covered there, but it's important to do it in a friendly and teaching way, if possible.

👍 3
sogaiu22:08:05

i also had or witnessed these kinds of encounters over the years (in various communities), but feel that although they still happen, there are far more positive interactions these days and for this i am grateful.

ghadi17:08:49

Please consider helping with the relief efforts for the Beirut explosion. The Lebanese people were struggling before yesterday, and even more so today. I can recommend these organizations: https://www.independent.co.uk/life-style/beirut-explosions-lebanon-how-to-help-victims-donate-blood-red-cross-a9654781.html

❤️ 15
9
Bobbi Towers18:08:41

Well it took me about 4 years of learning Clojure and I finally got a job... writing C#. 🤑🤪 My question is, well, for the people here who still have to do OOP for their job, how do you manage the cognitive dissonance? I've been indoctrinated into the belief that objects are bad, and thankful to have not had to learn (or therefore unlearn) them. My employer is open to me using any tech I want, but that means I still need to grok the existing C# codebase in order to reverse-engineer it. So I'm looking for any suggested resources for a Clojurian who has never learned OO before who needs to learn just enough to liberate this project from the dark side.

orestis05:08:20

Congrats on the job!

dpsutton18:08:53

F# and don’t do OOP in C#. You can get surprisingly far on static methods and objects as namespaces as I remember.

Bobbi Towers18:08:44

Well, the project is Windows Forms which I don't think supports F#

noisesmith18:08:51

yeah, I think OCaml has the best flavor of OO (really FP with a few hints of OO) of any system I've used, and F# is based on OCaml

noisesmith18:08:12

even if you can't use it, you can learn things from it that might apply...

noisesmith18:08:30

it compiles to the same bytecode as c# though I thought

noisesmith18:08:44

maybe it's more of a tooling consideration rather than compatibility per se

Bobbi Towers18:08:50

If it is indeed possible to subvert the paradigm through some hackery, I'd love to see some example of that or some kind of "How to do FP in C#" guide

noisesmith18:08:26

@porkostomus another thing that might help (YMMV - this works for me but others think this sounds nuts) - consider how Clojure already has good parts of OO. All our data structures use Interfaces, and our functions are built against those interfaces not concrete data objects. That's OO.

dpsutton18:08:27

Forms f# library from my former company

noisesmith18:08:22

just because you are using C# doesn't mean you need to use inheritance and mutation and getters and setters

dpsutton18:08:32

Static methods on classes taking immutable objects is very close to namespaces

💯 6
👍 3
Bobbi Towers18:08:06

Thanks, this is all really useful for me

manutter5118:08:09

If you can find some common/simple/generic classes to put your data in, and use those instead of adding data members to classes, you can write some pretty clojure-ish style code too

manutter5118:08:25

in combination with the static methods on classes mentioned above

manutter5118:08:34

I used to write some pretty Clojure-y PHP back before I finally landed my first Java job

noisesmith18:08:46

even if you compare the java standard library to mainstream java code, it's much closer to FP and less overboard with OO (inheritance chains are there for actual reuse, not for architectural framework nonsense, there's static methods everywhere, very few factory methods, even fewer factory objects)

manutter5118:08:46

Also if you focus on writing pure functions and minimizing global state, you’ll get a lot of the big wins that FP gives you.

💯 3
noisesmith18:08:19

I think most of the problems with OO are cultural, there's a few useful things there, and you don't need to do it the way most codebases do

noisesmith18:08:22

like most design tools, it works great when used judiciously, and if you ignore other people's standards of "normal" you can write great code in any language (though you do need to compromise with what they find understandable, programs are a collaboration with other humans after all)

noisesmith18:08:54

so don't ignore their standards, but bend them toward something more reasonable I guess? I definitely haven't solved this problem but I think about it quite a bit