Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is cpoll_cppsp framework type-safe as Ur/Web?

Looking at this answer (https://stackoverflow.com/a/2856961/1793629) I assume that Ur/Web is quite safe platform.

Now looking at this benchmark (http://www.techempower.com/benchmarks/#section=data-r9&hw=peak&test=json) I see that cpoll_cppsp framework is in most use cases 1st or in top 5.

Example code from (http://xa.us.to/cppsp/documentation.cppsp) is

<%#
#include <vector>
#include <string>
vector<string> hello() {
return {"hello", "world", "!"};
}
%>
<html>
<body>
    <table>
        auto a = hello();
        for(int i = 0; i < a.size(); i++) {
            %>
            <tr>
                <td><%=a[i] %></td>
            </tr>
            <%
        }
        %>
    </table>
</body>
</html>

Documentation is rather poor, so maybe someone could explain is this thing type-safe and has similar features(listed here: https://stackoverflow.com/a/2856961/1793629) as Ur/Web?

Thank you in advance.

like image 367
Ežiukas Stebintis Pasaulį Avatar asked Jun 04 '14 12:06

Ežiukas Stebintis Pasaulį


1 Answers

Since cppsp parse language is c++, it is not type safe (see http://en.wikipedia.org/wiki/Type_safety#C.2B.2B_Examples).

Crashs may occur due to invalid pointers.

Every feature listed in https://stackoverflow.com/a/2856961/1793629 can be broken by badly written c++ code.

like image 103
jaderhs Avatar answered Nov 14 '22 18:11

jaderhs