Integrated Dynamics

Integrated Dynamics

63M Downloads

Constant / K - Should have only one argument, and a different name?

void-spark opened this issue · 5 comments

commented

Issue type:

  • ➕ Feature request

Short description:

There is a 'Constant / K' in the logic programmer.
It takes two arguments, and it's output is the first argument.
The second argument seems to be ignored.
Since it's unused, it would be nice if the second argument could be removed, or at least documented why it's there :)
Also the name seems wrong.
A constant would be a unchanging value, like actually the 'Integer'/'Double' etc are.
But this is more like a Reference?, it points to the value of another variable card.

Note that I use these a lot actually, if I want a variable card that always matches a variable card in the variable store,
to use in a display for example, and that will keep matching it even if I change the 'source' card :)
It's not the same as a copy, since those don't change with the original card.
It's a little bit like a proxy I guess, with far less parts and restrictions :)

Maybe there is a better way of doing the same, I could not find it :)
Or maybe there should be a better way of doing the same :D

commented

Ahh, right, ID is the one that has one argument and does the same, I thought it gave the variable id.. :)

commented

And I guess with constant you can bind the first argument, which leaves you with a operator with one input, which ignores its input and always outputs the value you bound. Can use that as the start of a pipe or so I guess? But you could also have a constant which does that without having to bind it, set the value directly when you put constant in a value card :)

commented

I have no intention to change the name. It's a well-known name in combinatory logic :-)
See here for example: https://en.wikipedia.org/wiki/Combinatory_logic#Examples_of_combinators

commented

Thanks for the suggestion!

commented

Ok, I guess I don't do functional languages a lot, what about the 2 arguments? :)