3 ms·
It shows how programmers get buried in a paradigm. When I wrote lots f functional programs, my procedural programs started to look functional - even though it d
by bradley13 3y ago
It shows how programmers get buried in a paradigm. When I wrote lots f functional programs, my procedural programs started to look functional - even though it didn't make a lot of sense for the language. That's how C or Fortran programs can start looking like bad Lisp.
It's the same for other paradigms. When I was writing lots of logic programs, I tended to write lots of logical functions in procedural languages, even though it didn't make a lot of sense. Lots of recursion, which tends to be really inefficient without tail-recursion optimization.
Right now, my primary language is Java. And I really, really dislike lambdas in Java, because they are a poor imitation of actual lambdas expressions in pure functional languages.
- arethuza 3y agoI once worked on a project with someone who wrote Lisp in the style of Occam! Edit: I later converted his work into Lisp that wrote C++, which in retrospect was perhaps a bit unnecessary.
- jnxx 3y agoOccam and Lisp are both developed from the Lambda calculus and quite close relatives. The main difference is that Lisp is strong-dynamically typed (like Python), and Occam is statically typed (like, say, Java).
- arethuza 3y agoOccam was based on Hoare's CSP rather than Lambda Calculus and the relationship between your average Common Lisp program and Lambda Calculus is pretty distant. https://en.wikipedia.org/wiki/Occam_(programming_language) https://en.wikipedia.org/wiki/Occam_(programming_language) https://en.wikipedia.org/wiki/Communicating_sequential_processes https://en.wikipedia.org/wiki/Communicating_sequential_proce... Edit: Occam is probably closer to Go than Lisp.
- wredue 3y agoJava is working in different constraints. Java shops don’t move at the pace of JavaScript shops. These developers are looking for an actual work/life balance. Not looking for shake shit up. So Java lambdas, being little more than syntax sugar over an already existing concept in Java, works well for them. They get new sugar and don’t have to rewrite a bunch of old code for it. Anyway. Personally, I tend to get really annoyed with developers trying to use a language outside of its paradigm. Trying to write functional C is moronic just like trying to write procedural Haskell is moronic.