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

Pages: 1-

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-13 16:18

If you believe the academic erroneous return, you will die stupid and evil - for you
have not the mental freedom to comprehend Higher Order Wisdom of the Harmonic Simultaneous 4-Way Scalar Cube Return Principle. Until return is cornered, educators are liars.

Name: Anonymous 2018-02-13 16:18

Is this autotranslated from Japanese or something? I understand that it's about return vs. out parameters, but what exactly is it saying?

Name: Anonymous 2018-02-13 17:00

>>3
GOTO considered harmless

Name: Anonymous 2018-02-14 5:29

void noreturner(param*out,arguments* args){/*Its much faster and saves stack space*/ ;*out=result;}

Name: Anonymous 2018-02-14 19:20

>>5
Thank you for reinventing Prolog.

Name: Anonymous 2018-02-15 4:14

>>6
What does it have in common with out parameters(which btw exists since the early standard library(which use NULL pointer as no output))?

Name: Anonymous 2018-02-15 7:31

>>6
how the fuck is a C function with out-params like prolog? I doubt out-paramas are enough to have backtracking and logical relation queries

Name: Anonymous 2018-02-15 10:59

Source of GNU prolog, does seems to use tons of void functions and out parameters, but its just a feature of implementation(it could as well use function pointers).
http://gprolog.org/gprolog-1.4.4.tar.gz

Name: Anonymous 2018-02-15 11:03

>>9
does anyone even use GNU Prolog when superior SWI Prolog is available?

Name: Anonymous 2018-02-15 11:11

can SWI Prolog check those dubs?

Name: Anonymous 2018-02-15 11:39

>>11
Yes.
:- use_module(library(http/thread_httpd)).
:- use_module(library(http/http_dispatch))

Name: Anonymous 2018-02-15 11:43

>>12
That's actually pretty interesting. Far less verbose then a ````minimal'''' web server in Rust et al.

Name: Anonymous 2018-02-15 14:17

>>13
the paradox of Rust: a minimal web server is still verbose, but if it were less minimal then the compiler would reject it

Name: Anonymous 2018-02-15 15:10

Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of First order logic.

Name: Anonymous 2018-02-15 15:33

Name: Anonymous 2018-02-16 0:23

>>16
OK, so the title is a little clickbaity but seriously I've been on a tell, don't ask kick for a while. I like how it encourages methods to be used as messages in true object-oriented fashion. But this has a nagging problem that has been rattling about in my head.
That's not much better. It seems like every ``programmer'''s IQ dropped 50 points in the last 20 years. I blame C and /g/.

Name: Anonymous 2018-02-16 7:32

>>16
so the idea here is to stop using return and instead use a deterministic, referentially transparent out parameter which from a high-level perspective has no side-effects. which is literally the same fucking thing as using return. this is peak NIH.

Name: Anonymous 2018-02-16 12:05

those who do not understand return are doomed to reinvent it badly

Name: Anonymous 2018-02-16 13:50

>>17
C
is one of the last languages that I would associate with dropping IQ. HIBT?

Name: Anonymous 2018-02-16 13:57

>>20
is this your first time meeting mental midget-kun? he hates C with passion

Name: Anonymous 2018-02-16 14:10

dubs considered harmless

Name: Anonymous 2018-02-16 17:53

>>20
Learning C fucks up your brain so you are unable to understand computer science. It cuts your IQ in half. C hackers can't imagine that it's possible to build a computer that works differently, like one based on lazy evaluation or arrays and strings as values. When C hackers think about arrays and strings, they're thinking about array decay and null terminators. C has caused incredible damage to the brains of programmers.

Name: Air-cooled Alan 2018-02-16 20:59

>>23
if you want a slow as fuck program then don't use C
your toy scripting languages are implemented in C and there's nothing you can do with them that you can't do faster in C

Name: Anonymous 2018-02-16 21:50

>>24
Your brain is too damaged to understand that there is more than C. C requires slow hardware because of how it does data structures, so of course everything implemented in C is ``slow as fuck''.

Name: Air-cooled Alan 2018-02-16 22:05

>>25
your hardware does not exist
real computers are programmed in C

Name: Anonymous 2018-02-17 0:27

>>26
I don't care about conventional practice. I am a computer scientist and I explore the boundaries of theory.

Name: Anonymous 2018-02-17 2:01

>>27
I am a computer scientist
Is that what you kids call code monkeys?

Name: Anonymous 2018-02-17 2:33

>>28
No. Code monkeys are not interested in the boundaries of theoretical computer science. Only computer scientists are interested.

Name: Anonymous 2018-02-18 0:47

>>29
You would be disappointed to know

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