I/O related question, and ini parsing

2013-12-05 Thread Mineko
So, it's my first time implementing something like logging and ini parsing/creating, and it appears to work perfectly, but I'm not neccessarily a master of D yet.. So, I wanted some advice from my seniors if there's anything I should improve on such, I might be missing out on some D-only feat

Re: I/O related question, and ini parsing

2013-12-05 Thread Ali Çehreli
On 12/05/2013 08:43 PM, Mineko wrote: > I might be missing out on some D-only features The first thing I've noticed is that you are not using UFCS, perhaps because you don't like it (yet ;) ) but look how natural the syntax becomes: existing code (my indentation): temp = findSplitAfter(f

Re: I/O related question, and ini parsing

2013-12-05 Thread Mineko
On Friday, 6 December 2013 at 05:22:07 UTC, Ali Çehreli wrote: On 12/05/2013 08:43 PM, Mineko wrote: > I might be missing out on some D-only features The first thing I've noticed is that you are not using UFCS, perhaps because you don't like it (yet ;) ) but look how natural the syntax become

Re: I/O related question, and ini parsing

2013-12-06 Thread Mineko
On Friday, 6 December 2013 at 05:32:56 UTC, Mineko wrote: On Friday, 6 December 2013 at 05:22:07 UTC, Ali Çehreli wrote: On 12/05/2013 08:43 PM, Mineko wrote: > I might be missing out on some D-only features The first thing I've noticed is that you are not using UFCS, perhaps because you don'

Re: I/O related question, and ini parsing

2013-12-06 Thread bearophile
Mineko: https://github.com/MinekoRox/Breaker-3D-Game-Engine Notes: - Usually in D imports are at the top (after module name and module ddoc). - Perhaps io.getDir is better written an a switch on strings. - I suggest to add the immutable/cost to every variable that doesn't need to mutate, in

Re: I/O related question, and ini parsing

2013-12-06 Thread Dicebot
On Friday, 6 December 2013 at 16:56:29 UTC, bearophile wrote: Mineko: https://github.com/MinekoRox/Breaker-3D-Game-Engine Notes: - Usually in D imports are at the top (after module name and module ddoc). I think it is a bad practice that should be discouraged. Moving as much imports as po

Re: I/O related question, and ini parsing

2013-12-06 Thread bearophile
Dicebot: I think it is a bad practice that should be discouraged. Moving as much imports as possible into local scope has lot of practical benefits, primarily maintenance and compilation times. Right. I was referring to the global ones. Bye, bearophile

Re: I/O related question, and ini parsing

2013-12-06 Thread Mineko
Alright cool, I'll get on that real soon, I'm not too used to D's importing system anyway, so I appreciate it. I suppose I'll have to do some research on pure and nothrow too, I've never really bothered with those.

Re: I/O related question, and ini parsing

2013-12-07 Thread nazriel
On Friday, 6 December 2013 at 04:43:44 UTC, Mineko wrote: So, it's my first time implementing something like logging and ini parsing/creating, and it appears to work perfectly, but I'm not neccessarily a master of D yet.. So, I wanted some advice from my seniors if there's anything I should i

Re: I/O related question, and ini parsing

2013-12-07 Thread Mineko
On Saturday, 7 December 2013 at 12:23:38 UTC, nazriel wrote: On Friday, 6 December 2013 at 04:43:44 UTC, Mineko wrote: So, it's my first time implementing something like logging and ini parsing/creating, and it appears to work perfectly, but I'm not neccessarily a master of D yet.. So, I want

Re: I/O related question, and ini parsing

2013-12-07 Thread Mineko
On Saturday, 7 December 2013 at 12:23:38 UTC, nazriel wrote: imports are private by default. Also I noticed few overlaping private declarations, for example here: https://github.com/MinekoRox/Breaker-3D-Game-Engine/blob/master/src/breaker/utility/belt.d#L54 Sorry for the double post, this ju

Re: I/O related question, and ini parsing

2013-12-07 Thread Gary Willoughby
On Friday, 6 December 2013 at 05:32:56 UTC, Mineko wrote: On Friday, 6 December 2013 at 05:22:07 UTC, Ali Çehreli wrote: On 12/05/2013 08:43 PM, Mineko wrote: > I might be missing out on some D-only features The first thing I've noticed is that you are not using UFCS, perhaps because you don'