On 13/05/2011 08:09, Jacob Carlborg wrote:
On 2011-05-12 16:45, Adam Ruppe wrote:
Could you share how or show an URL that provide sample code to do
that in D?
Check out my D api demo:
http://arsdnet.net/cgi-bin/apidemo/
Here's the source code (about 50 lines of D)
http://arsdnet.net/apidemo.d
And the HTML templates it uses:
http://arsdnet.net/apidemo-document.html
http://arsdnet.net/apidemo-javascript.html
The libraries it imports are available here
http://arsdnet.net/dcode/
How is it working out with a static type system, compared to a dynamic,
for web development?
How many times, while using a dynamically typed language, do you ever
change the type of a variable? I've written a fair amount of PHP, and I
rarely, if ever want my string to suddenly become an integer (if I do it
generally needs validation/conversion anyway). When using my own and
others code I frequently see type checks/conversions etc, it just makes
the code ugly - with a staticly typed system you remove this overhead.
Also, there's the auto keyword, and easily accessible function templates.
--
Robert
http://octarineparrot.com/