Hacker News new | ask | show | jobs
by tasuki 2260 days ago
> I switched from scala to python and oh man what a relief.

I did a bit of Python, then did a bit of Scala, and now do both at work. Oh what a pain Python is! And what a joy Scala is!

> Way too many theoretical concepts, monads, monoids , isomorphisms ect that make you feel stupid.

Concepts are theoretical in their nature, aren't they? Perhaps these concepts are useful and you just haven't yet found out why?

Wrt feeling stupid, there are two possible reactions: "gee, I'm not so smart" and "whee a learning opportunity" - I'll prefer the latter anytime.

> There is always a nagging feeling that you don't 'get it' when you program in scala

Yes I have that too - so much more to learn!

1 comments

> Perhaps these concepts are useful and you just haven't yet found out why?

Or maybe they are not that useful? If they were really that useful we would see those concepts everywhere.

You do see those concepts everywhere.

monads : stuff which kind of encapsulate other things, but you can still nicely manipulate both the thing and the stuff. Let's say, lists.

monoids : set of things where you kind of can add one to another. Let's say, numbers

isomorphisms : functions where there is exactly as many outputs possible than there are possible inputs. Let's say, adding 1 to a number. It's kind of useful knowing whether or not a function is an isomorphism (hello, hash collisions !).

Those concepts aren't specific to any programming language in fact, and are in fact everywhere. You just don't need to explicit them to use them, expliciting them is an option (even in Scala) which allows you to do meta manipulations on them (which Scala doesn't require, and doesn't even really suggest since none are part of the standard lib).

oh ok. Any thoughts on why scala conferences have this "Describable, typesafe computations for the less monadically inclined" but python conferences don't ?
Because doing something like that without a type system (which Python doesn't have) to guide your hand is practically impossible.

I would expect Clojure programmers (while still functional) don't use these abstractions either.

On the other hand, typed languages, like Haskell, Scala, OCaml, F#, do employ these abstract concepts. Their type system makes these worthwhile endeavour with great payoff.

Oh I was asking if they( monoids, monads ect) are everywhere like GP claimed then how come monads isn't something that talked about in clojure or python conferences. But its always talked about in scala conferences.
Well, maybe scala conferences are hosted and attended by people who are interested in those concepts and find them attractive to talk about ? "conference people" just develop their own meta over time

Also, I just clicked on the most recent conference on clojure.org : https://clojured.de/schedule/ , and there is a talk mentioning monads while promising to not talk about monads :-D So it kind of reinforce my point that basic theoretical concepts are silently everywhere ^^ (and fully not necessary for almost everything).

But I don't think conferences are representative of the "on the ground production experience" that you have, or at least can have.

I personnaly wouldn't submit a paper to a conference with a talk "Here's how I made a whole backend stack using boring scala, and it just works" because as you say, I feel it's just full of theoretical speakers and that wouldn't interest anyone. Meanwhile, I also did code a whole backend in boring scala, and it in fact just works, and it feels good :-)

Oh I was asking if they( monoids, monads ect) are everywhere like GP claimed then how come monads isn't something that talked about in clojure or python conferences.