Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 4661 days ago | link | parent

I agree overall, but... I will note that object orientation is possible, for instance with my "object.arc" library[1]. However, I don't use the "." syntax for that either... for instance, this in JavaScript:

  foo.bar(qux);
Would be this, with my library:

  (foo<-bar qux)
However, it may be cool to be able to write "foo.bar(qux)" with my library instead. I've also considered a pretty radical idea, having every function dispatch to a method on an object. So this:

  (car foo)
Would translate to this, automatically:

  (foo<-car)
In any case, I agree that with functional style, I prefer Arc's syntax. But assuming somebody were to write/use an OOP library for Arc, I can see why they would prefer a more traditional syntax.

I think, ideally, Arc should allow you to change the syntax, on a file-by-file (expression-by-expression?) basis. Then the default could be what it is right now, but still allow people to write with whatever syntax they want. Arc isn't there yet, but I think that's a nice ideal to strive for.

---

P.S. Somewhat related, is the concept of "sweet expressions": http://www.dwheeler.com/readable/

With sweet expressions, you can write "foo(bar)" rather than "(foo bar)", but it still allows you to use "(foo bar)" when you want to. In other words, it lets you mix-and-match Lisp syntax and more traditional syntax, even within the same file. So you can use whichever one happens to be most readable at the time.

---

* [1]: https://github.com/Pauan/ar/blob/lib/object.arc