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

Pure OO vs. Curried Syntax

Name: Anonymous 2010-08-07 23:18

So /prog/, I have looked around and I haven't been able to find any more-or-less pure OO languages with curried syntax. What gives?

It's not uncommon to see: object message message message

Where object message returns an object which accepts takes the next message, but what if the message is a method call that takes parameters? Instead of returning a curried object, you still get: object method(a,b) method(x,y), but never: object method a b method x y -- why is that?

Name: Anonymous 2010-08-10 16:01

>>40
Ah, I think I was a bit unclear after all:

The other parens are unnecessary in Ocaml, but it was put there to get the *exact* same behaviour as if they were curried
Assuming the result is functionally equivalent, that's enough. It's syntax currying that has my interest, without being concerned so much with whether it is actually being curried mechanically. It's advantageous to optimize the process away, though not required. I would still require a partial application to yield a closure of course.

Maybe you could convince the Ocaml guys to give a "currying mode"?
I'm not sure it would be worth it. I posted this thread hoping it would be more interesting than the average fare here lately, although I am personally interested in the exploration of the idea. I think there are a lot of rough edges that should be explored before adopting a syntax like this. (I'll admit I'm half considering doing an esolang based on the idea. It's not quite as crazy as, say, Dieter: http://catseye.tc/projects/dieter/doc/website_dieter.html)

Name: Anonymous 2010-08-11 3:59

bump

Name: Anonymous 2010-08-11 4:06

66SHUT THE FUCK UP99
-Expert LUA programmer.

Name: Anonymous 2010-08-11 8:01

Syntactic pseudo-“programming” thread.

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