Op woensdag 22 februari 2006 17:45, schreef Dries Buytaert:
If we can use .ini-files, we should. No need to invent our own file format/parser. PHP has built-in functionality to parse .ini-files:
May I introduce you all to YAML? http://www.yaml.org/ Yaml has the power of XML but the simplicity of INI. you can store any PHP^D^D^DRuby variable in yaml you can store any SQL database as YAML (true) you can store simple stuff like structured data in a very simple way. (true) </cynical RoR plugging> But other that that. I am not keen on ini. Not even on YAML. let alone on XML. why? We all write PHP. We all know it. Why not use it? why learn some new markup, some YAML, or some INI syntax, when we all even dream PHP. I ask you, what is the difference between: LeetBox_info() { return array( 'version' => '1.2.548' 'description' => 'this is teh leetest module evah: I tell you' 'depends' => array ('1337', 'forum', 'FooBar'); ); } and [LeetBox info] version: 1.2.548 description: this is teh leetest module evah[colon] I tell you #if you need a : or a ; please use [colon] or [semicolon] instead depends:1337, forum, FooBar #please use ! if your name needs a comma ? Those few ascii thingies? Imagine all the benefit of PHP: Unicode *cough*, t()-abiltiy, not having to learn YAML etc. Imagine all those libs in Drupal that one can (ab)use. etc. I see one main difference: PHP means stuff to me, that ini thing requires me to look up the syntax, to find ways around issues long fixed in PHP and above all to lean something new that I will not use anywhere else anyway! Bèr -- PGP ber@webschuur.com http://www.webschuur.com/sites/webschuur.com/files/ber_webschuur.asc PGP berkessels@gmx.net http://www.webschuur.com/sites/webschuur.com/files/ber_gmx.asc