__init__()
[Thread Prev] | [Thread Next]
- Subject: __init__()
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Date: Sun, 28 Jun 2015 14:34:28 -0700
- To: myrddin-dev@xxxxxxxxxxxxxx
__init__ functions are now working. Any function named __init__ will be called before main(), allowing you to initialize your library, set up custom formatters for your data types, open files, etc. These initializers are called in reverse topological order, which means that all of your dependencies will have had their initializers called (if they have them) before yours are called. For example: use std const __init__ = { use_std() } Is perfectly valid, because it's guaranteed that any initialization done in 'std' is finished before the __init__ function in question is called. Disclaimer: Magical pre-main code can be confusing, Please use gently. Side effects include confusion and internal bleeding. Do not take orally. Not to be used for the other use. -- Ori Bernstein
Re: __init__() | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: Build errors. Again.
- Next by Date: Re: __init__()
- Previous by thread: Re: Build errors. Again.
- Next by thread: Re: __init__()
- Index(es):