top | item 42842283

(no title)

gergo_barany | 1 year ago

> You don't have to implicitly supply the "this" parameter to each "object" predicate if you don't want to [...] if you were really interested in that level of syntactic sugar.

Given that the original "feature request" (https://news.ycombinator.com/item?id=42829985) was this:

>>>> There is no concept of "current maze", like in OO you would have with this.maze, or in Haskell you would do with a reader monad. As a result, all the "internal" predicates in a module get full of parameters all they do is pass around until some final predicate uses it to do some calculation.

I would say that yes, the OP wanted exactly that level of syntactic sugar and your previous suggestions [1] and [2] were addressing something else entirely.

> you could insert that yourself via compilation (with term/goal expansion)[4]

Yes, that's why I meant above by "Logtalk-like code generation". Suggesting that I study the thing that I suggested feels a little condescending.

discuss

order

No comments yet.