[plt-scheme] Why do folks implement statically typed languages?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Thu May 31 16:19:36 EDT 2007

Richard Cobbe skrev:

> Are there static type systems that can protect against, e.g., SQL
> injection?

I have always wondered why people aren't using Prepare more.
Is it too expensive? Or is the reason perhaps that people are
using languages without closures?

<http://planet.plt-scheme.org/package-source/jaymccarthy/sqlite.plt/3/1/doc.txt>

 > (define s (prepare db (sql (SELECT (entry_id title url score)
                                   FROM entries
                                   ORDER-BY (score DESC)
                                   LIMIT ,"?"))))
 > (load-params s 5)
 > (step* s)
(#4(6 "A TITLE" "AN URL" 0)
  #4(1 "Everything Scheme" "http://www.scheme.dk/blog/" 42)
  #4(3 "PLT Scheme" "http://www.plt-scheme.org" 9)
  #4(2 "Reddit" "http://www.reddit.com" 7)
  #4(4 "PLT Scheme" "http://www.plt-scheme.org" 5))

-- 
Jens Axel Søgaard



Posted on the users mailing list.