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

Which new language should I learn? [SOLVED]

Name: Anonymous 2011-12-19 20:03

Haskell and Python have gotten boring. Ruby is basically python with some added crap and SLOW-er AS FUCK. Factor is too stack based. Javascript (including derivatives), Racket and Common Lisp is too crap and Chez Scheme is too proprietary. Clojure is too JVM, {{C,F}#,Scala,Boo,Nemerle,Cobra,etc.} is too Microsoft, Oz is horribly ugly, Prolog is too logic oriented.

I usually use Haskell and Python. Python is inherently boring, and I've lately done a crapton of repetitive Haskell programming which has temporarily ruined it for me. I recently wrote a few lines of PHP, and even though it sucked hard due to all PHPs faults, it was kind of fun. I miss the tricks with magical methods to hack in multiple inheritance, custom functionality in mixins depending on special syntax in comments read through reflection, and … wait.

Oh, god, I just figured it out: Perl 6.

Name: Anonymous 2011-12-19 21:14

>>12 Well, you're saying that if you pass a function with wrong arity to a higher order function you may get strange results?

Anyway, it's very easy to make nice looking control structures thanks to how blocks work and the fact that functions may choose not to evaluate specific arguments.

list: [1 2 3 4 5]
foreach i list [print i]

foreach is a normal rebol function. it doesn't evaluate its first argument, so you don't have to quote the symbol.
This can be done in a function definition like so:
func ['x] [print ["you've passed the symbol" x]]

Another example:
numbers: [1 4 5 6 8]
remove-each number numbers [odd? number]

again, remove-each is a normal rebol function


Note also that the block containing the numbers is the same kind of block as the one containing the code.
a-block: [print "lorem ipsum"]
foreach i a-block a-block

this will print lorem ipsum twice.

Here you can try out some code:
  http://tryrebol.esperconsultancy.nl/



I'm really liking this language. Too bad it seems to be practically dead.

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