News for hackers. Stuff that matters.
Re:Don't let Event-Driven Architecture buzzwords fool you by motoboi on Thursday March 02, 2023 @06:56AM (#34994690)
Considering that object oriented programming began as a message passing and ended up as a request response paradigm (and the entangled mess it can be), I suppose event-driven will follow the same path.
Re:Don't let Event-Driven Architecture buzzwords fool you by cdogl on Thursday March 02, 2023 @07:17AM (#34994811)
I’m not very literate in CS; I don’t understand your characterisation of late OO as a request response paradigm. Isn’t calling a function or method to get a result just procedural programming 101?
Re:Don't let Event-Driven Architecture buzzwords fool you by senorrib on Thursday March 02, 2023 @07:21AM (#34994830)
Yes, it is, and OOP was all about message passing, not synchronous calls. The current incantation in pretty much all OOP languages (excepted maybe Smalltalk) is basically procedural programming with namespaces.
Re:Don't let Event-Driven Architecture buzzwords fool you by whstl on Thursday March 02, 2023 @07:32AM (#34994889)
"All about message passing" was Alan Kay's vision of OOP, which was very distinct from what is considered OOP both before and after. He did coin the term "OOP" himself, though, so of course his definition carries a lot of weight, of course.

Even Simula, the original OOP language, is much closer to the procedural-ish OOP than to Smalltalk.

Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Thursday March 02, 2023 @08:32AM (#34995420)
Genuine ignorant question: is this a language problem or a coding problem? I'm thinking of "sending a message" as a synchronous function call. Could you not code in a style that passes messages around?
Re:Don't let Event-Driven Architecture buzzwords fool you by motoboi on Thursday March 02, 2023 @11:16AM (#34997637)
Message passing has no response.

You can simulate request-response with it, using a channel to go one way and another the other way, but it can get pretty convoluted.

Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Thursday March 02, 2023 @11:29AM (#34997892)
Understood, but could you not do this by coding style? I.e. calling a method returns void?
Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Thursday March 02, 2023 @02:58PM (#35001099)
Whether something is already implemented in a language's core library, or a package you can use, or you build your own library, is immaterial. You can implement any patter with any turing complete language, and you can build your own language.
Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Friday March 03, 2023 @02:19AM (#35006772)
That's true, but I'm not really talking about that.
Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Friday March 03, 2023 @04:20AM (#35007467)
Correct me if I'm wrong, but you asked if message passing rests on language facilities or code style. Answer is neither. You can implement message passing patterns in Forth, in C, in Python, or you can use Erlang or Smalltalk and get it out of the box.
Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Sunday March 05, 2023 @04:06AM (#35028046)
I wasn't making it exclusive. I think the answer is either, not neither.

The thing I wasn't asking was "can I implement a language that can do this in Java?" which is why I don't think the Turing completeness comment is particularly relevant.

Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Monday March 06, 2023 @02:24AM (#35038362)
Depends on neither is the same as 'you can do with either'. Just different ways to express the same answer.
Re:Don't let Event-Driven Architecture buzzwords fool you by st4lz on Friday March 03, 2023 @08:36AM (#35009390)
That's exactly what they want to avoid.

The true goal of event-driven is the separation of concenrns, so you don't call `execute_payment`, `send_confirmation_email`, `include_in_report_dashboard` etc inside a `complete_order`.

Instead, you emit "order_issued" event and all subscribers can act based on the event, completely unknown from `complete_order`.

At least that is how I understand it.

Re:Don't let Event-Driven Architecture buzzwords fool you by pjmlp on Thursday March 02, 2023 @10:26AM (#34996809)
Erlang, Objective-C, Ruby, JavaScript, CLOS still offer that as concept.

Then all the languages that support Component Programming via traits, interfaces, data classes, OS ABI like COM, or whatever they feel like calling it, do as well.

Re:Don't let Event-Driven Architecture buzzwords fool you by motoboi on Thursday March 02, 2023 @11:19AM (#34997686)
I suppose yes, if you disregard the state changes at the recipient.

Also, from the point of view of the caller it can be considered just a function call.