This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Alternate syntax for field access/method calls


Chris Dean wrote:

    (define-namespace jframe <javax.swing.JFrame>)
    ;; ...
    (let ((frame (jframe:new "Kawa App")))
      (jframe:get-content-pane frame))

than this:

    (let ((frame :: <javax.swing.JFrame>
                 (new <javax.swing.JFrame> "Kawa App")))
      (& frame 'getContentPane))


The first way also has the advantage of not requiring much type annotation in the prgram.

Though at the cost of extra run-time casts, at least until Kawa does better data-flow/type-inference. -- --Per Bothner per@bothner.com http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]