Arc Forumnew | comments | leaders | submitlogin
On the naming of $
5 points by CatDancer 6287 days ago | 9 comments
Anarki has a macro called $ which is very cool: it lets you run Scheme code from inside of Arc. This means we can use the extensive MzScheme libraries without having to modify ac.scm, which is very nice.

However... short names are rare and precious. Punctuation names even more so. Are we really going to be making calls out to Scheme so often in most of the code we write that we should give it such a singular name as $?

While we use short names (fn, !, do, no, if, etc.) often in code, when calling out to Scheme it's usually done once in some function that's being defined ("mkdir", "date", etc.), and then most of the calls are to that function.

I propose in the spirit of xdef we call the $ macro "xscheme".

This also means that when we get to the point of being able to call code written in other languages, we'll be able to use consistent names: xpython, xruby, xperl, and so on.



2 points by nex3 6287 days ago | link

I like $. I think the shortness is important, because it is used a lot - arc simply doesn't have the functionality to do a lot of the scheme stuff we need. And it looks like and S, so it's mnemonic.

Plus I think in the long run, it will phase out of use. We'll settle on a good core set of features for Scheme to provide, provide those in-Scheme, and leave it at that. Maybe then we can rename it. But for now, while we're still exploring that area, it's important to make it easy.

-----

7 points by CatDancer 6287 days ago | link

My more serious objection is the inclusion of $ in the "stable" branch. Whatever makes it easy for you to do experiments in the wiki is fine with me. However the stable branch is advertised as being arcn + bug fixes, and I don't think taking over a punctuation symbol in support of fixing a couple of bugs such as "date" and "mkdir" qualifies.

-----

1 point by nex3 6287 days ago | link

Yeah, I wasn't really sure about this. It seemed to be the path of least resistance, but if you want to write make-directory, which-os, and so forth (or their more primitive components) in Scheme and get rid of $, go for it.

-----

5 points by nex3 6287 days ago | link

Okay, I've gone ahead and done this. Stable no longer references $ at all.

-----

2 points by CatDancer 6287 days ago | link

Well, I take that back. I'm not sure yet what I do want to do, but applying patches over other people's patches isn't it.

-----

2 points by eds 6287 days ago | link

There is still seval, right? You could use seval rather than $ in the stable branch, since it won't have to be updated except for arcn releases and bug fixes, so maintenance won't be too much of a problem. And it doesn't require writing entirely new library functions to implement.

-----

3 points by nex3 6287 days ago | link

I'm not sure why this would be any better than using $. I'd rather just add library functions and be done with it.

-----

0 points by CatDancer 6287 days ago | link

ok

-----

4 points by absz 6287 days ago | link

As a point of information, the relevant "axiom" is called seval, and $ is just defined to implicitly quote things.

-----