variable existence checking

A.V.Kuznetsov kuzn at umps.mephi.ru
Fri Jun 8 17:18:41 CEST 2007


Hi,

> > the discussion went out. To avoid losing of the feature,
> > can I add it to the Niki's Feature Wishlist?
> 
> You can... but if you ever hope to have it see the light of day, help with the
> design, and maybe even supply code.

I am not a programmer. How can I help?

> This is a big deal in the NEdit macro language. So far, any unset variable can
> only do one thing: receive a value. Anything else causes the macro to fail.
> With my ?? proposed operator this would be extended to testing for existence.
> The typeof "function" would require that the unset "value" can be passed to a
> function (unless it's implemented as a keyword!). One small step to assigning
> a variable with the content of another; Boolean tests (any expression with
> unset variables are false); participation in arithmetic (unset == 0 say, as in
> Awk)...
> 
> Actually, I like JavaScript's way of handling this, but I don't know (I
> haven't made up my own mind) if this is what we need in NEdit. I like NEdit
> macros breaking "early" because I didn't code something properly. I also don't
> like the idea of making the behaviour change according to a setting: then you
> can never have macros that are compatible between users. If we change this, we
> change it for everybody.
> 
> I'd still like to see other things there first: most of my syntax enhancements
> in fact! And proper macro memory management: I've a load of source code that I
> never integrated to do this, because the job is pretty huge, and I don't have
> too much contiguous time available outside the day job.

Your patches are helpful, I also like to see them in code.
I want to use the syntax enhancements, but cannot do that now:
"...then you can never have macros that are compatible between users."

I consider Niki's Feature Wishlist as "features kept in mind". Otherwise...
	A feature is requested,
	A patch is made and tested.
	The problem is closed,
	The feature is .... lost.

Alexey








More information about the Discuss mailing list