Live data from Hacker News

Using Clojure for Web Apps

github.com

121–122 of 122 posts

Re: Using Clojure for Web Apps

#121

Earlier quoted context omitted.

That wasn’t very nice, but it felt spot on. Curly braces are the chicken nuggets and fries of computer science, lol. Within about 18 months at university (80s), I learned BASIC, FORTRAN, Pascal and Lisp. Syntax, yeah, whatever. (We transitioned to C later, to my horror, with an eye towards a future using “C with classes”)

> Syntax, yeah, whatever. The vast majority of the programming world simply doesn't seem to agree.

True.

Don’t expect me to be happy about that, though.

I’ll even upvote your comment, as it does matter a little. Too bad C is what “we” settled for.

Re: Using Clojure for Web Apps

#122

Earlier quoted context omitted.

But this looks like a sql injection awaiting to happen: (defn inc! [id] (kc/exec-raw (format "UPDATE articles SET count = count + 1 WHERE id = %s" id))) (From https://github.com/tbsschroeder/clojure-webshop-app/blob/mas... ) You don't need format it seems: https://github.com/korma/Korma/blob/master/src/korma/core.cl...

sanitizing SQL queries is just as simple in Clojure as in any other language (maybe more so), even if it wasn't done in this example.

It looks like it is builtin even in the library he uses. So not sure why he chooses format.
Post reply on HN