On Apr 19, 2008, at 1:30 PM, Brian Frank wrote:

> One thing I really wish Java would
> solve is the keyword problem - for example if a Fan class declared a
> method called "import", then it wouldn't be usable in Java.  C# solves
> with the @ symbol.

There are a few parts to that:

0. The community has to decide to support some specific convention of  
symbolic freedom that VMs and languages will support, regardless of  
language-specific and VM-specific restrictions.  I think the default  
answer has to be Lisp's, which is any string can be a name, with  
social pressure against abuses.

1. The JVM has to provide a way around its own mild but peculiar  
restrictions against characters like slash and semicolon.  (It is  
unreasonable to deny Scheme a symbol named '/' just because the JVM  
has another internal use for that character.)

Here is the best way I know of to relax the JVM restrictions; it  
works today: http://blogs.sun.com/jrose/entry/symbolic_freedom_in_the_vm

2,3,4,... Each language has to admit the existence of spellings from  
other languages by supporting an escape syntax for exotic names.  For  
example, Groovy supports foo.'bar!', where the thing after the dot is  
lexically a string but syntactically a name.  It's a one-line hack in  
the parser.  I think Java should do something similar with single  
quotes and/or backslashes and be done with it.  Java has a special  
reason to do this, because it will be the "systems programming  
language" on the JVM for the foreseeable future.

-- John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to