<abu[7]>
As I said, I do not believe that your idea of passing key/value pairs to methods in a "hidden" syntax is useful
<abu[7]>
PicoLisp tries to be always simple and clear, with nothing behind the scenes
<abu[7]>
The abstraction you propose is - in my experience - not helpful
<abu[7]>
It solves non-existing problems
<abu[7]>
I would implement the classes and methods first, and *then* see if anything should be abstracted
<abu[7]>
For your case (as far as I understood it), I would start with this: http://pb1n.de/?f85b57
<pablo_escoberg>
Yeah, that's exactly what I was starting to do. Then I realized I would be doing it over and over again, so decided to abstract. Clearly you agree it's a useful abstraction because you built it into the class function. And, if it worked in subsclasses of classes with constructors defined, I'd be done (though I might finish the experiment just
<pablo_escoberg>
to make sure I know how to do it). And I tend to abstract very early. In 40 years of coding, it's never come back and bitten me (though, admittedly, there is a first time for everything :D).
<pablo_escoberg>
Appreciate the advice, though. I really may end up going a different way.
<pablo_escoberg>
ITMT, though, I am out of town for a few days and working with my travel laptop which has a small screen, so I'll probably take a break from that stuff and work on vim. I know that somewhere in the source code is a list of all builtin functions I can use to define keywords. Can you save me some time and tell me where it is?
<abu[7]>
"agree it's a useful abstraction" definitely not. I *never* had a situation where you put lots of properties in one swoop
<pablo_escoberg>
really? Then why did you build it into the class function?
<abu[7]>
You mean the 'new' function?
<abu[7]>
the T method
<pablo_escoberg>
the T method, yes
<pablo_escoberg>
I find that little feature mindbogglingly useful
<abu[7]>
thats just a fallback if there is *no* T method
<abu[7]>
and it takes individual arguments, not a pre-built list
<abu[7]>
building such a list is tedious and has unnecessary consing overhead
<pablo_escoberg>
I thought it took a bunch of kv pairs and interned them
<abu[7]>
no
<abu[7]>
a list
<abu[7]>
n
<abu[7]>
and not interning, but 'put'ting
<pablo_escoberg>
right putting to This.
<abu[7]>
"intern" has a special meaning in Lisp
<pablo_escoberg>
right, my bad.
<abu[7]>
Normally you do something with the args
<abu[7]>
not just store them in the object
<abu[7]>
See my example above
<abu[7]>
a T method and close>
<abu[7]>
the fifos in tmp, so they are automatically cleared up upon exit
<abu[7]>
I see no use in simply storing stuff
<pablo_escoberg>
right, I will be doing something with most of the args. But just about every class I define will also take a few options that will be used in various methods. This will be an almost univeral pattern. There will not be long lists, maybe 3-5 kv pairs in most cases
<abu[7]>
if you pass just the values, you don't need keys
<abu[7]>
much easier
<abu[7]>
and a lot more readable
<abu[7]>
passing keys needs "knowledge" about the internals of the object
<abu[7]>
a method should encapsulate this
<pablo_escoberg>
ok, I think I am failing to get across what I am trying to do, so let me try again.
<abu[7]>
(dm foo> (A B) (=: x A) (+ (=: y B) 7))
<abu[7]>
x and y are not known outside
<pablo_escoberg>
Sorry, those are coming through as emoticons on my end...
<pablo_escoberg>
can you pb pls?
<abu[7]>
the (dm foo> ?
<abu[7]>
Can you check the irc log?
<pablo_escoberg>
yeah, 1 sec
<abu[7]>
I did not send non-ASCII chars
<pablo_escoberg>
ok, got it. It's the web client that's doing it.
<abu[7]>
strange
<abu[7]>
So let's talk when you are back :)
<pablo_escoberg>
ok, cool. Back on Friday, I think. ITMT working on vim anyway.
<abu[7]>
Though a "small screen" is not an issue. I'm working solely on my 6.4 inch phone
<abu[7]>
(also this chat)
<pablo_escoberg>
Well, you are much more of a badass than I am; that much is clear.
<abu[7]>
yeah, I'm extreme :D
<pablo_escoberg>
If I can help it, I want to see as much as possible at the same time. Used to work with 4 monitors
<pablo_escoberg>
now down to one big one, but going to a small one leads to alt-tab fatigue :)
<abu[7]>
I understand
<pablo_escoberg>
Oh, one more question I had before I go: Are there any examples for the comma read macro? It seems like it should be quite useful but I don't understand exactly what it does.
<abu[7]>
yeah, in fact it is used only for one single purpos: