wycats / javascript-decorators

2.4k stars 127 forks source link

define (or link for?) the phrase "design time"? #37

Open darrencruse opened 8 years ago

darrencruse commented 8 years ago

I hope I'm not sounding like a total idiot (maybe it's a common term I haven't heard of?) but I confess I was thrown by "design time" in the very first sentence:

"Decorators make it possible to annotate and modify classes and properties at design time."

Maybe the doc could provide a definition/link/footnote for what "design time" refers to?

(I googled but didn't find one)

It sounds like it's meant in the spirit of "run-time" versus "compile-time" - so for a moment I wondered if it was saying this was going to define code that's actually run by an IDE or something but reading the whole thing I see the decorators are run at run-time and (if I'm following) on the first pass through the code when properties on the class object's prototypes are setup.

So I guess "design time" is referring to this "first-pass" over declarations at the beginning of "run-time"?

Is this a common term in the javascript world now I wonder? (googling it looks like maybe it's used more with Typescript maybe that's why it threw me I'm not a Typescripter :).

yuchi commented 8 years ago

Design time means roughly ‘when the developer writes and declares the classes/objects/interfaces’ and therefore means that it's something that must be both human and machine readable. AFAIK.

darrencruse commented 8 years ago

I'd been working on a lisp transpiler a lot recently. Maybe that's why "design time" had me thinking like "compile time"/"run time" (a big deal with lisp macros).

I guess thinking on those terms is what threw me a little...

@yuchi so the way you explained it, "design time" seems roughly a synonym for being "declarative"?

yuchi commented 8 years ago

I infer it is.

silkentrance commented 8 years ago

@darrencruse In Javascript, just as in Python, design time is basically also runtime. WIth the exception that in Javascript, babel that is, the use of decorators is enforced by the transpiler and limited to only classes and fields thereof.

guiprav commented 6 years ago

Still unclear what design-time means, even though I'm seeing it in many places. Wishing for an authoritative reference that precisely explains it :) I've even tried to look for references specific to Python, but no luck.