DEV Community

Discussion on: OOP a software development mass psychosis

Collapse
 
siy profile image
Sergiy Yevtushenko

Actually, your code does nothing useful beside generation of useless traffic (result of the operation are ignored) :)

In the Java framework I'm working on, your code will look like this:

import static org.pragmatica.lang.Promise.all;
...
all(
    HttpClient.get("https://gaiasoul.com"),
    HttpClient.get("https://servergardens.com")
);
Enter fullscreen mode Exit fullscreen mode

Wish I have more time to work on this framework...

Thread Thread
 
polterguy profile image
Thomas Hansen • Edited

Beautiful, but of course creating libraries that simplifies things is possible in all languages. When I was doing my LOC count, I considered the bare bones implementation using HttpClient from .Net ...

Najs code though :)

Edit;

result of the operation are ignored

I didn't see this one before now, but no, my example does not ignore the result of the operation. That's the purpose of the [join] keyword in Hyperlambda. It waits for the [fork] invocations to finish, and returns the result of the invocations to the caller. To access the content of the first for instance would be as easy as follows.

get-value:x:@join/0/**/content
Enter fullscreen mode Exit fullscreen mode