From: Ken A. <kan...@bb...> - 2003-09-26 21:24:34
|
At 05:10 PM 9/25/2003 -0400, Anton van Straaten wrote: >Ken Anderson wrote: >> Anton, could you say more about what your liked about >> SISC's generics over java dot notation? > >Joe Marshall also asked me about why I preferred SISC's generics. I gave >some more detail in this post on c.l.s.: > >http://groups.google.com/groups?selm=YVkcb.6092%24ai7.2351%40newsread1.news. >atl.earthlink.net > >I think there are pros and cons to both approaches (see the above post for >more detail). The main advantage I found with the SISC approach is very >much one of the "feel" of working with Java objects in Scheme, in terms of >the Schemeliness of procedure names, so it is certainly a subjective matter. Yes, I now see that SISC has a clever way of keeping names Schemey. In my JScheme code, i've adopted to use the Java style camelWords for naming. This makes it easier for people who know Java and are seeing Scheme for the first time, but makes the Scheme look unusual to a Schemer. JavaDot alsom make the Scheme unsual. However, we chose it because it elimiated other problems like name conflicts on primitve procedures like length.... >My comment re Javadot on c.l.s. came from having first felt that I needed >something like Javadot to work with Java objects, but ultimately finding >that (a) I didn't really need it, and (b) that I preferred not having all >those Java-esque names in my code. Conceptually, I take the position that >any Java functionality could in theory be replaced by Scheme functionality, >so I'd rather have a consistent interface to both - a sort of variation on >Bertrand Meyer's principle of uniform access. >However, I should make clear that the reason I began using SISC over JScheme >was more to do with R5RS-compliance. The biggest single issue for me was >that I use syntax-rules macros in code on other Schemes, and wanted to have >as much portability as possible between the implementations I use. At the >time, JScheme didn't support syntax-rules, at least not in the default >distribution. This seemed like an indicator that R5RS-compliance was not a >priority - combined, of course, with the R4RS mention on the web pages. Yes, this is something we should correct. For example, Dan' Friedman's code: http://www.cs.indiana.edu/~dfried/ooo.ss for http://www.cs.indiana.edu/~dfried/ooo.pdf which are about the hariest macros i've seen works fine in JScheme. I'll provided it as a JScheme example after Dan presents his talk. Also Peter and i had lots of experience with the Lisp hurt-yourself macros, and i'm only now getting good enough to write Scheme ones. >> In the first version of JScheme (SILK) you had to >> mention each method you wanted to use from a >> Java class and that became pretty tedious quickly. > >I imagine that this would have a lot to do with the kinds of applications >being written. In most cases, I've ended up implementing a module to wrap >some Java functionality, and declared the needed generic procedures there, >so the main body of code doesn't need to worry about declaring them. I see >the need for these explicit declarations as a tradeoff for the ability to >have Scheme-like names for Java methods, as well as having generic methods >that can work on either Java or Scheme objects. > >> It doesn't look like SISC much with its Java side. For example, >> there isn't a gui library like JLIB, or Tim's collaboration stuff. > >I haven't looked into that, since I've been working on server-side web >applications. The kind of things I've been doing have involved interfacing >to Java business objects, web framework code, and persistence code. I'll >clarify that on c.l.s. Here's a great SISC paper which sounds similar to what you are doing: http://schematics.sourceforge.net/scheme-london/nmk-case-study.pdf I'd love to hear more about what you'r up to. |