Huh? What does this even mean? Both languages are very different from each other and the only thing they really have in common is having functions — how is one more “profound” than the other or any less worthy of being “functional programming”, for whatever that means to you?
As for something profound I'd point you to
https://github.com/cerner/clara-rules
which many people will struggle with because like many other production rules engines in LISP (and many other examples of simple compilers), there is hardly any code! Contrast that to the orders of magnitude larger rules engine Drools
https://github.com/kiegroup/drools
which is so crazy-complicated primarily because the Drools language is Java-based so you need all sorts of things that Clara or CLIPS don't need. Note that both of these systems use variations of this algorithm
https://en.wikipedia.org/wiki/Rete_algorithm
where a set of rules can be compiled to a network of transitions that can happen when facts are added to the knowledge base so it is very much an example of compiler technology. (That said, Drools supports a lot of features that Clara doesn't and also supports a very advanced RETE-like algorithm that can exploit parallelism that early versions couldn't.)
Safety critical code seems to still be usually in C/C++, for reasons having nothing to do with the language being safe. Why are these people not studying Erlang, MISRA C, Rust, some kind of formal proof solver language, or OpenCL?
What do people aspire to one day work on that would make the Haskell or LISP more appealing than a more locked down, static checking, kind of language?
Programming culture is more confusing than the code itself!
functional >> OO
and "OO sux" and all that. I think most of these people hadn't worked in the industry enough to have a clear picture of what better productivity and lower defects would look like but instead they were looking for a movement to join.It is interesting how functional programming has to consider data organization completely differently, but sometimes it is just that, a tool or methodology, not a philosophy to subscribe to. Ideally, the good (or future good) engineers realize this and try to understand the less talked about soft skills needed to succeed.
The stuff I was really excited about was mostly "tech in the physical world" related.
Although with the AI boom, and how I'm too clumsy for jobs involving driving... I might be making a lot more if I'd at least tried to focus on the pure programming stuff instead of embedded, even though I never had any real talent for advanced algorithms...
from drools website
"Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules Engine (BRE), a web authoring and rules management application (Drools Workbench), full runtime support for Decision Model and Notation (DMN) models at Conformance level 3 and an Eclipse IDE plugin for core development."
No expert here, but it doesn't come across as a fair apples-to-apples comparison.
Drools even has some projects like OptaPlanner and jBPM that are in different source code repositories.
The core in Drools really is dramatically more complex than the core of Clara and some of that really is the higher level of functionality (Drools supports both hash-based and ordered indexes for data because you need that for complex event processing, Clara has only hash indexes) but a lot of it is that the syntax of Drools is much more complex because it mixes Java expressions and statements with the rules languages thus it needs a real parser.
I was working on a project with Drools and had extreme difficulty because Drools error messages didn't make a lot of sense to me so I did a lot of looking at the Drools source code, running the compiler in the debugger and such and still didn't get very far. I switched over to the Jena Rules engine
https://jena.apache.org/documentation/inference/
which still emits lousy error messages but I quickly was able to understand everything about the Jena Rules Engine, get really good at writing extensions, and use it for things the developers said were unsupported such as using it as the control plane of a data processing engine that bridged stream and batch processing: I'd use Jena rules to control the process of setting up and tearing down reactive streams that would do a data processing job. That is, I got good at the Jena Rules Engine that I kept discovering new things I could do with it.
Clara is very similar to the legendary CLIPS rule engine from the golden age of ai
and if you find Clara is too small to understand, CLIPS is even smaller. The massive reduction in code size comes from being able to lean on the affordances of LISP to develop a DSL for writing rules, if you have to write a parser and all the stuff that comes with defining an external DSL rules language your code starts to get much more complex.
Jena Rules Engine is written in Java and I think it is very nice code and you'll learn a lot about RETE engines and other advanced programming concepts by studying it, you might even get more out of it than you get out of Clara. It was common at the tail end of the golden age of A.I. for people to write a first draft of a system in Common Lisp and then end up re-writing in it C++ for performance. Many of the ideas you get out of Lisp programming apply just well to other programming languages but require a huge amount of elbow grease and in-depth understanding of compiler technology whereas you can frequently use macros and similar affordances in Lisp to implement very sophisticated ideas with postage stamp size coded (that granted many people find challenging to understand.)
Also, having asked about Haskell, I'm not sure why you brought Java into this!
(Unfortunately many people are chasing the Holy Grail of "functional programming" and never finding it because "functional programming" is a pale shadow of what's possible when you understand how compilers work: this is how Common LISP and scheme are so much more profound then, say, Haskell)
It's a little out of date but I was lately thinking up about the Scott Adams adventure games of the early 1980s that were written with a specialized interpreter which could be implemented in BASIC but was also implemented in assembly language for better performance. See
https://ahopeful.wordpress.com/2020/09/13/digging-up-adventu...
If you tried to implement a game like that directly in a language like BASIC you would be driven nuts because that kind of game is fundamentally "object oriented" in that there are a number of things like rooms and items that are all mostly the same except they are different in some ways and trying to code that with IF, THEN and ELSE is bad enough even before GOTO gets added to the mix. The thing is that GOTO becomes quite benign and even useful when it is used to implement interpreters.
So back in the day you would study systems like that to stretch your skills, today I would look at compilers and related technology, like the Jena rules engine.