by johnday · 3y ago · 0 comments
As other posters have said, strong typing is also a nice property for lots of reasons, most notably it gives a platform to talk about ad-hoc and parametric polymorphism.
(I lecture on Functional Programming at the University of Warwick, where we use Haskell.)
The second is that languages like Lisp, SML, C, Pascal and BASIC all have referentially transparent and referentially opaque positions in exactly the same way that languages like Haskell do.
This means that all these languages enjoy referential transparency in the same way, because when you unpack the notion of equivalence, referential transparency itself is within a whisker of being a tautology: if a is equivalent to b, then you can substitute a for b or b for a. The relevant sense for "is equivalent to" can really only be contextual equivalence, which is all about meaning-preserving substitutability.
That said, not having to reason about effects within one's program equivalence sure makes things simpler in a pedagogical setting. But that's not to do with referential transparency per se.
Or at least not inherently, if by “lisp” one is primarily referring to s-expressions.
(a a)
calls a function 'a' on a variable 'a'. Lisp knows this because the first thing that comes after the left paren is a functionthis isn't just user facing - for example let* kind of depends on creating bindings up front so they work across clauses, and then mutating them afterwards
https://www.lispworks.com/documentation/lw70/CLHS/Body/s_let...