3 ms·
About (1) The first Prolog program I ran just blew my mind - sort of "But how did it do that!?" I understood what I wrote down, and how that explained the prob
by philipswood 5y ago
About (1)
The first Prolog program I ran just blew my mind - sort of "But how did it do that!?"
I understood what I wrote down, and how that explained the problem, but a mental model if how that was used by the runtime to solve the problem needed a while to develop.
Similarly Smalltalk was like: "Everything is an object?".
I mean the language doesn't have an "if" statement! You send a code block as a message to a boolean value with an "ifTrue" method.
Not that I know these languages to any significant depth, just dabbling.
To me there are a few oddball languages that are simple, have one abstraction of abstraction and are quite weird, but have a stack record of "heroic deeds" by their practitioners.
I mean C#, Java, C, C++, Go are quite similar if you squint.
But Prolog, Forth, Smalltalk, J, Lisp, etc. are definitely something else that stretches your mind a bit in different directions.
And I think that this is a valid point.
It's worth spending a bit of time reading about and playing with these languages. Not because they are useful (although they might well be), but because they will give you a few different ways of thinking about problems that will extend your mental reach.
- gompertz 5y agoI feel the same way about Snobol4. It gave me the same wow factor that Prolog did.
- pvinis 5y agoI came to this thread to write about prolog too. it wasn't the first program I wrote, but after a good introduction, then I started thinking the way prolog makes you think, I was blown away. I loved it and I hope I get to use it again!
- JadeNB 5y ago> Similarly Smalltalk was like: "Everything is an object?". I mean the language doesn't have an "if" statement! You send a code block as a message to a boolean value with an "ifTrue" method. Incidentally, I don't think that this is how they got there, but this could have come from taking the lambda calculus extremely seriously: in the classical encoding, `true = fst` and `false = snd` (i.e., `true x y = x` and `false x y = y`; or, pointlessly, `true = const` and `false = true id`), so that `if` is just `id`, in the sense that `if true = true` (meaning `if true x y = true x y = x`) and `if false = false` (meaning `if false x y = false x y = y`). https://en.wikipedia.org/wiki/Lambda_calculus#Logic_and_predicates https://en.wikipedia.org/wiki/Lambda_calculus#Logic_and_pred...