[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some more nitpicks



Jonathan Hseu <vomjom@vomjom.org> writes:

> Is there an easy way to make arrays with multiple dimensions?

no, suggestions?  should be easy enough to add a fab and accessors.

> Also, (new) is currently like:
> (new <my-class> prop1 value1 prop2 value2)
>
> Would it not be better to have it:
> (new <my-class> (prop1 value1) (prop2 value2))

no, because new is not a special form.  users can write methods on new
and take initializers as a rest argument.  as an example, consider the
new method for threads:

  (dm new (x|(t< <thread>) args|... => <thread>)
    (def t (app-sup x args))
    (unless (== (thread-function t) main-thread-key) ...)
    t)

i accept that the prop value's run together a bit too much for my
liking.  i'm trying to avoid using keywords instead of real generics
for tagging the properties.  using real generics allows one to limit
prop initialization through namespace hiding, whereas keywords don't
have that control.
      
-- jrb

> Jonathan Hseu <vomjom@vomjom.org, vomjom@debian.org, jh4@cec.wustl.edu>
> GPG ID:          5228D713
> GPG fingerprint: 220B A4EF 70FE B884 CB38  F93F EA8A 1024 5228 D713