|
I am PHP developer, but that first "Overview" example looks all sorts of wrong to me. I know this is just an example, but programming without view/controller separation, view models, writing queries inside views, mixing business logic in views? No no no I saw so much horrbible stuff like this I can't unsee aaaah God help me... :D Ok, on serious note: I think this language looks interesting. But I do not like built-in templating, for various reasons. The fact that you have implicit "out" channel for printing stuff means clunky ways to control it, like "ob_start" and friends. In my humble opinion, templating should be turned on only explicitly. Then you could use the same language for views (excelent!), without a risk of outputing strings where you shouldn't. Also "{" and "}" in templates are not very elegant. I know us programmers got used to them, but a designer would be much better with simple statements like "if", "else", "endif", like Twig templates do, or even like we used to do in php: <?php if (x): ?> <?php else: ?> <?php endif; ?> |
I don't understand why you wouldn't just use a framework like Sinatra. It's simple in every way that qualifies it to contend with a 'hypertext preprocessor'. Add it to your gem file, bundle, git commit, push to heroku, deployed! It even has inline templates[1].
You could argue it has a learning curve, but is resistance to learning a good argument against a solid & simple, versatile framework?
[1] http://www.sinatrarb.com/intro.html#Inline%20Templates