I am recently interested in learning a new language called Opa which seems to be promising when I read about it. As far as wikipedia describes it, it is capable of client-side,server-side scripting as well as can also be used for database (correct me if wrong). My question is: How does the OPa compiler know, which side the script should be executed? Should it be user defined?
Asked
Active
Viewed 224 times
1 Answers
4
You can annotate a function to force it to be on one specific side. But it is not mandatory, you can let the compiler decide.
For example, a DOM access is on client side, a database query is on server side. But when possible, a function is compiled for both side.
Read http://doc.opalang.org/manual/Developing-for-the-web/Client-server-distribution for further information.

Cédrics
- 1,974
- 11
- 13