How to web programming with D2?
I am trying to write the web framework(but not to write, to gain experience.). Maybe the framework can has got a MVC desing pattern. But first, the D2 is not has got for the web library and I am decided write to library for web. I am writed a function for post and get methods. (I am not tried to functions. But I think, they are works.) POST: https://github.com/canalpay/turna/blob/master/library/post.d GET : https://github.com/canalpay/turna/blob/master/library/get.d Environment variables are easy to write for the function. But How to write a cookie and session? I looked at the codes of tango. However, don't understand.(I'm new to d programming language.)
function-local template specialization error
void main() { T input(T)() {} T input(T : string)() {} } Error message : isimsiz.d(6): found 'input' when expecting ';' following statement isimsiz.d(6): found ':' when expecting ')' isimsiz.d(6): found 'string' when expecting ';' following statement isimsiz.d(6): found ')' instead of statement isimsiz.d(8): unrecognized declaration Shouldn't that work? And void main() { void input(T)() {} void input(T : string)() {} } Again, Shouldn't that work? Error message: isimsiz.d(6): Error: declaration input(T : string) is already defined there is no problem when the templates are in the global namespace.