5 ms·
That example of "Surprise type conversions" is crazy. Did not know that. While i do not think PHP is a perfect programing language. There is one think i LOVE a
by callesgg 10y ago
That example of "Surprise type conversions" is crazy.
Did not know that.
While i do not think PHP is a perfect programing language. There is one think i LOVE about PHP, it is that the PHP "community's" default way of documenting code behavior is to make a small example.
When i read most other languages documentation i read it. Then i need to make a small test to verify that i understood it.
All those tests takes a long time to make and i have to make them over and over again, every time i forget the way a function behaves.
- bitwalker 10y agoIn my experience code examples as documentation are far more common than actual documentation (e.g. guides, user manuals), but perhaps I just haven't worked in a language where the opposite is true.
- tracker1 10y agoYou can take a look at the node api docs... there are some areas (particularly in crypto), where it's really hard to understand what you need to do, as there are pretty much no examples of actually exercising said code. So you go searching via google, find a similar example, look at the docs again, and hope that you got it right. It's harder still when you're trying to en/decrypt data from multiple programming languages... Java is particularly painful as well, since a lot of the things that are "standard" are abstracted behind class structures with naming that differs from the standards.
- phatbyte 10y agoYou will be happy learning Swift then. I love how Apple created it's documentation.