Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Curl programming language

Name: Anonymous 2010-06-06 11:12

Hey /prog/,

have you done anything in Curl (http://en.wikipedia.org/wiki/Curl_%28programming_language%29)? If so, is it any good? It looks kind of Lispy, and is attached to an apparently pretty decent RIA platform.

For those who have never heard of it, here's, some variations of factorial as code samples:

{define-proc {factorial n}
    {return {if n < 2
             then 1
             else n * {factorial (n - 1)}}}}

{define-proc {factorial n}
    {let result = 1}
    {for i = 2 to n do
        {set result = i * result}}
    {return result}}

{define-proc {factorial n}
    {let loop = {proc {acc, n}
                    {return {if n < 2
                             then acc
                             else {loop acc * n, n - 1}}}}}
    {return {loop 1, n}}}

Name: Anonymous 2010-06-07 16:25

>>19
It kinda does, actually, because writing HTML in Curl's syntax and mixing it seamlessly with code seems to me a way better proposition than writing it in that eyesore of a syntax that SGML descendants have, and then having to use some crappy language unrelated language like Javascript to manipulate it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List