Hacker News new | ask | show | jobs
by wslh 804 days ago
I don't agree about the cognitive load, people are different and the idea that there is a "single developer mind" is completely wrong. For example, YMMV, if you look at LINQ in .NET is a natural query language over different paradigms. I don't think it adds a cognitive load.

And, we should also think about the way that computer science and/or software engineering is studied. If there were a better teaching approach about multiparadigm thinking there would be less cognitive load. My argument is that when you work professionally you don't spend the same cognitive requirements that studying at university because even unconsciously you assume that you know most of the material.

What I agree is that you would not find many people who are profficient in Haskell/OCaml/Lisp at the same time of imperative languages. You can know both but it is rare to work interchangeably in both. Again, I think that part of this is how we learn computer science and that new pedagogic ways could help to be at least good in both.

My personal frustration with logic implementations like Prolog is that the promise on focusing in the "what" instead of in the "how" is not fullfiled. I think that SMT solvers like Z3 are great in this topic at the expense of narrowing the problem space.

1 comments

LINQ is an interesting example because it exists in two forms, query syntax and method syntax. You might consider these "mini-paradigms". Most users know one or the other. I've rarely met people who are equally proficient at both. But almost anything you can accomplish in query form can also be done in method form, and the industry has settled on method syntax as the standard.

Why do you think that is? I think it's because method syntax fits more neatly into the larger C# paradigm of imperative code. Using both requires the developer to pivot to a different mental model (declarative coding), so we try to standardize on the one that fits best in the bigger picture. This is what I mean by cognitive load. Most devs can surely handle both, but why make them do extra mental work when that effort is better spent on the problem domain.

I think it is more about education, the way "we" study/teach programming than an intrinsecally problem about paradigms. I personally find the query syntax better and I am not working as a developer "anymore". I would say that is a matter of taste and education. Related [1]. Personally, I look for simple and clear syntaxes and don't have a problem switching from one programming language to another while the focus in the solution is clear.

[1] https://www.reddit.com/r/csharp/comments/w7n11s/why_does_the...

I understand what you're saying, and I agree people should be able to switch as needed. But look at one of the top comments from that link (I swear that wasn't me):

"I find query syntax nigh unreadable. It's like someone stuck some other language in the middle of my C#. The mental switch between that small snippet of code and the surrounding code is harsh and annoying." [1]

[1] https://www.reddit.com/r/csharp/comments/w7n11s/why_does_the...