Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

return considered harmful

Name: Anonymous 2018-02-13 16:06

Alright, so the title is a little clickbaity however genuinely I've been on a tell, don't approach kick for some time. I like how it urges strategies to be utilized as messages in obvious protest arranged mold. In any case, this has an annoying issue that has been rattling about in my mind.

I have come to speculate that elegantly composed code can take after OO standards and utilitarian standards in the meantime. I'm endeavoring to accommodate these thoughts and the enormous staying point that I've arrived on is return.

An unadulterated capacity has two characteristics:

Calling it over and again with similar data sources dependably gives a similar outcome. This infers it is permanent. Its state is set just once.

It creates no symptoms. The main change caused by calling it is delivering the outcome.

All in all, how can one approach being simply useful in the event that you've sworn off utilizing return as your method for conveying comes about?

The tell, don't ask thought works by utilizing what some would think about a reaction. When I manage a question I don't get some information about its interior state. I reveal to it what I should be done and it utilizes its inner state to make sense of what to do with what I've instructed it to do. When I disclose to it I don't ask what it did. I simply anticipate that it will have taken care of what it was advised to do.

Route once upon a time, when circle drives really had plates in them and a thumb drive was what you did in the auto when the wheel was excessively chilly, making it impossible to touch with your fingers, I was shown how irritating individuals consider capacities that have out parameters. void swap(int *first, int *second) appeared to be so convenient yet we were urged to compose capacities that returned the outcomes. So I acknowledged this on confidence and began tailing it.

In any case, now I see individuals building structures where objects let how they were developed control where they send their outcomes. It appears somewhat like the out parameter thought once more. In any case, that is the way tell-don't-ask objects tell different articles what they've done.

When I initially found out about symptoms I thought of it like the yield parameter where we're being advised not to astound individuals by having a portion of the work occur shockingly by not following the return result tradition. Presently beyond any doubt, I know there's a heap of parallel nonconcurrent threading issues that reactions grime about with.

What I'm extremely endeavoring to inquire:

Is return the best way to stay away from all that symptom hopelessness. Or on the other hand would i be able to take after tell, don't ask in an absolutely useful manner?

Name: Anonymous 2018-02-15 11:11

can SWI Prolog check those dubs?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List