[Vimperator] un[let]

Виктор Виктор
Wed Sep 19 12:58:15 PDT 2007


В ср, 2007-09-19 в 20:13 +1000, Doug Kearns написа:
> On 9/19/07, Виктор Кожухаров <vkojouharov at gmail.com> wrote:
> > В ср, 2007-09-19 в 03:37 +1000, Doug Kearns написа:
> 
> <snip>
> 
> > My idea is to also have JS be the main language,
> > and if we isolate such useful functions, script writes can use them with
> > ease (lets say that all JS/vimscript scripts are executed so that the
> > main namespace is not window, but vimperator.vimscript).
> 
> Yes but I think Martin had a good reason that it was inconvenient to
> do that now, however,  I can't quite remember what that was at the
> moment.

> <snip>
> 
> > > Looks useful to me. Two quick comments:
> > > - Options have a value property so you don't need to call getter() explicitly
> > I was looking for something like that, but the only thing I could find
> > was getter(). So .value would be equivalent to .getter() then?
> 
> Yes.
> 
> > > - variableReference() should probably be a 'private' helper...at least for now.
> > unless I'm mistaken here, this would mean that variableReference would
> > only be accessible from methods of the vimperator object. However, this
> > is also used for the commands, so I don't see how to make it private.
> 
> Right, but with your current implementation wouldn't you really just
> use v.globalVariables.x?

> I'm not sure what utility there is in passing "g:x" to
> variableReference and it returning [v.globalVariables, "x", "g"] -
> particularly if there's not much chance of the other variable scopes
> appearing anytime soon.
> 
Not really. b:var can be implemented right now, given enough time. v:var
can also be implemented if we need anything from it. The rest are not
viable at the moment, but we have 3 to worry about.

> Just one more style issue to annoy you... I'm probably outnumbered
> here but I really don't think there's any point in these arg guard
> clauses we use - they really just hide bugs.  I'd much prefer for it
> to simply fail when called without an arg (or passed an empty string)
> than return a result that would probably lead the caller to simply
> conclude that the variable was undefined. Client code has _some_
> responsibilities. ;-)
> 
That's just a placeholder. Without an arg, it should display all the
relevant variables. But this should be implement from someone who knows
how to use that new pager multiliner thing.
> <snip>
> 
> Regards,
> Doug
> _______________________________________________
> Vimperator mailing list
> Vimperator at mozdev.org
> http://www.mozdev.org/mailman/listinfo/vimperator
-- 
Виктор Кожухаров /Viktor Kojouharov/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: =?UTF-8?Q?=D0=A2=D0=BE=D0=B2=D0=B0?= =?UTF-8?Q?_=D0=B5?=
	=?UTF-8?Q?_=D1=86=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=BE?=
	=?UTF-8?Q?_=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B0?=
	=?UTF-8?Q?_=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?Q?_=D0=BE=D1=82?=
	=?UTF-8?Q?_=D0=BF=D0=B8=D1=81=D0=BC=D0=BE=D1=82=D0=BE?=
Url : http://www.mozdev.org/pipermail/vimperator/attachments/20070919/f998d413/attachment.bin 


More information about the Vimperator mailing list