Arc Forumnew | comments | leaders | submitlogin
2 points by CatDancer 5439 days ago | link | parent

1) How would using a separate namespace for functions give a lot more flexibility?

2) Yes, starting with arc2 is fine; especially if you're going through the Arc tutorial.



1 point by Adlai 5439 days ago | link

Having separate meaning, determined by context, means that you don't have to use as many distinct identifiers in your program. This is especially pronounced if you're trying to use short identifiers, because there are fewer short identifiers that have some intuitive meaning attached to them, and I think it's useful to allow context to alter this meaning.

However, now that I think of it a bit more, making Arc a Lisp-2 would interfere with using compound data in the place of functions. If you have a symbol whose value is a compound type, and that symbol also has a function value, that creates an ambiguous situation. I'll have to suspend my opinions about Lisp-n-ness until I've used Arc for a while.

-----

2 points by pg 5438 days ago | link

Having separate meaning, determined by context, means that you don't have to use as many distinct identifiers in your program.

That would make your code very confusing. Even in Lisp 2s, programmers avoid using the same names for functions and ordinary variables.

Arc3 is getting stable enough that you can probably start with that. Most basic stuff (e.g. everything in the tutorial) should be the same anyway.

-----

7 points by zbeane 5437 days ago | link

> Even in Lisp 2s, programmers avoid using the same names for functions and ordinary variables.

No, they don't.

-----

1 point by Adlai 5436 days ago | link

I'm a big fan of using identifiers such as 'list, 'string, 'fn (isn't a problem in CL, but is one in Arc), 'array, 'char, etc. Often a general name is the most concise and appropriate name to use.

I think that since Arc is supposed to be designed towards flexibility and usability for the programmer, it should have few restrictions, and a common namespace is such a restriction.

However, my opinion on this could change as I explore Arc over the next few weeks.

-----