Re: Prototype-Based Programming

new topic     » goto parent     » topic index » view thread      » older message » newer message

Yes, OOP isn't silver bullet. There are other techniques. Lisp is functional language. Component Pascal (created by OOP-hater Niklaus Wirth) is component-oriented. The most understandable explanation of component paradigm (if you familiar with .NET a bit, like me). Imagine that you have made several class libraries (possibly in different languages) and compiled them in a separate DLLs. Then you glue them using PowerShell. But how to glue DLLs writed in Euphoria? Get and send parameters by win32lib? Thanks, but I know easier ways to commit suicide.

Euphoria is pure (poor) procedural language. I started the program in Euphoria, it was very simple, but now simplicity prevent me to continue. Erlang based on unique paradigm, where each part of program is independent process (with it's own memory, data flow, garbage collector). Processes can send messages similar to e-mail. Processes receive the messages sent to them (as well as broadcast messages). What will they do with them - it depends on the process, on nothing else. This allows you to do these tricks, as an update of the program during its operation. So you can reinstall the operating system, and then proceed to answer your interlocutors by e-mail. These will look like you were late with a response, but communication is not interrupted.

Yes, all of them possible to organize in the Euphoria. Instead of messages - stack of maps. Instead of prototypes - maps containing not only data, but also pointers. You can organize the stack of messages. Not necessarily between several programs, even though it is possible (via sockets, for example).

I'm not saying that we should implement this paradigm. I was just demonstrating the flexibility of different approaches. No matter what the approach. Maybe later I will demonstrate a prototype implementation of a prototype paradigm. :) But what do you propose to Euphoria? Why Wirth did not stop at the stage of Modula-2, if modularity is enough? By the way, modern (I mean, younger than 20 years, haha) Pascals is not improved Pascal, but degraded Modula-2.

What is Euphoria in such sense? I think it is somewhere between modern Pascal and Modula-2. Maybe I'm wrong, and it is placed below. But not above, sure.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu