5 ms·
I find Shen lang interesting, but never actually tried it. Can anyone explain few things? 1. Why explicitly call `prolog?` function? Why not make it implicit,
by kovrik 10y ago
I find Shen lang interesting, but never actually tried it.
Can anyone explain few things?
1. Why explicitly call `prolog?` function? Why not make it implicit, so user could use, for example, `member` function (defined via `defprolog` notation) as a normal function?
2. Automatic partial application. I see that example was simplified, but then how it looks in reality? Because I find (* 2) returning `lambda`, instead of 2 confusing.
- mej10 10y agoIn math ( * ) is a binary operation. ( * 2) returning 2 is confusing to everyone that hasn't gotten used to a non-standard way of thinking about * .
- kovrik 10y ago> In math ( * ) is a binary operation. https://en.wikipedia.org/wiki/Empty_product https://en.wikipedia.org/wiki/Empty_product I am talking about Empty Product. In all Lisps I know ( * ) returns 1, (* n) returns n. Which makes sense. Shen's example is confusing for me.
- MichaelBurge 10y ago* :: a -> a -> a Π :: {a} -> a
- thaumasiotes 10y agoThis would make nonsense out of exponents less than 2. Fortunately, they actually make perfect sense.