You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can not compute factorial.
I mean, technically we can, we can just create a nice script function as a body and it does would do it - something like this:
But this is cheating.
We may want to have a way to support this w/o having a Turing Complete scripting extension.
There is another way - using fork and then just having a join to keep on multiplying the value out of the fork.
That also, feels like cheating.
What we are really saying is that there is a lack of "self-referential" structure with halting.
Should we have it? We do not know.
On a related note, this problem I am not solving right now - because it has become a test bed of detecting - "DSA" and "CS Fundumentals" in a practical level - thanks to this question here: Quora Question
It is interesting to see how people would approach it, variously.
The approach differentiates their real knowledge and maturity level.
I expect someone at Staff Engineer level to crack it, but anything works.
We can not compute factorial.
I mean, technically we can, we can just create a nice script function as a body and it does would do it - something like this:
But this is cheating.
We may want to have a way to support this w/o having a Turing Complete scripting extension.
There is another way - using fork and then just having a join to keep on multiplying the value out of the fork.
That also, feels like cheating.
What we are really saying is that there is a lack of "self-referential" structure with halting.
Should we have it? We do not know.
https://stackoverflow.com/questions/315340/practical-non-turing-complete-languages
The text was updated successfully, but these errors were encountered: