Re: __init__()
[Thread Prev] | [Thread Next]
- Subject: Re: __init__()
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Date: Sun, 28 Jun 2015 14:45:30 -0700
- To: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Cc: myrddin-dev@xxxxxxxxxxxxxx
Should also mention that it comes with an ABI bump, which means that you'll need to clean and re-bootstrap. On Sun, 28 Jun 2015 14:34:28 -0700, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote: > __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 > -- Ori Bernstein
__init__() | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: __init__()
- Next by Date: Pull requests?
- Previous by thread: __init__()
- Next by thread: Pull requests?
- Index(es):