> I have been a fan of custom constants since I started using 4D, probably
because
> my background in C meant that I couldn’t imagine a programming
environment which
> didn’t have them (whether as preprocessor directives or enumerations).

How have you coped with no enumerated types and no structs? I regularly
feel the urge to resort to self-harm because 4D has no structs and I never
used C. I mean, structs (and similar) a language feature from the
1970s...not exactly some fancy modern novelty.

>Boolean constants: why? What more than True and False do you need?

Now there is an entirely fair question which I failed to answer well in my
feature request. Happily, Miyako answered it well:

I think what you are after is more like

MyMethod (with_this_option;without_that_option)

instead of

MyMethod (True;False)

Yes. Lables that mean true or false - I would use them a lot. Here's an
example:

Method_DoThingsAndStuff (True) // Eh?
Method_DoThingsAndStuff (Open file) // That's better.

> Removing constants from compiled / distribution code. For completed
databases, yes. For components, no: I use constants
> exported from components as a way of communicating with them, as
selectors or parameters.

Good point. Yeah, better that this is an option. I'm still getting used to
4D's components and haven't thought everything through. Sometimes, I want
exacty what you describe, other times what I want is to make sure that
extra constants are tossed to avoid duplication up at the host database
level. Best would be if 4D would check for duplicate constants and notify
us. Righ now, you can stack multiple identical constants into the same
system.

> I remember being bewildered when I started using 4D that the 4D Chart
didn’t using constants for the huge
> array of selectors passed to its routines, but needed me to remember
numeric selectors.
Oh, that's been fixed! They killed 4D Chart ;-) Oddly enough, the new
charting (toy) feature GRAPH supports 8 chart types but they're specified
by numerics without constants. I added my own custom constants for these.

> But I must confess to being a monster, sadly.
You. Monster. I think that a lot of fancy conversations about programming
style boil down to typing speed. I'm probably in the 80-90% in typing speed
and I
loveReallyLongNamesThatCompletelyDescribeWhatAMethodDoesClearlyAndCompletely.
Others don't. I had a boss that typed like a chicken looking for corn. His
names were, well, brief. No philosophy, it was just hard for him to get
anything done because of his limited keyboard skills. There would have been
no problem spreading some philosophy on top of that as an excuse but, well,
it came down to only having a finger on each hand for typing.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to