digitalmars.D.announce - Another XML DOM Package
- apz28 (3/3) Dec 29 2016 This is my first package to learn D. Suggestion for improvement
- Guillaume Piolat (14/17) Jan 04 2017 Welcome here!
- Daniel =?iso-8859-1?b?S2964Ws=?= via Digitalmars-d-announce (17/41) Jan 04 2017 Guillaume Piolat via Digitalmars-d-announce=20
- apz28 (11/29) Jan 05 2017 1. no need for "public import std.exception
This is my first package to learn D. Suggestion for improvement is welcome. https://github.com/apz28/dlang-xml
Dec 29 2016
On Friday, 30 December 2016 at 04:19:47 UTC, apz28 wrote:This is my first package to learn D. Suggestion for improvement is welcome. https://github.com/apz28/dlang-xmlWelcome here! - you don't have to commit .sln files, dub can generate them as needed - that is for a package that will be reused you can use dub :) - no need to use property, there was a recent discussion about it. I think you can ignore it altogether. - you can use "final" before a class declaration to have all methods be final final class C { /* all methods are final /= } - no need for "public import std.exception : Exception;" to use Exception imho the XML parser to beat in our ecosystem is kxml, which is small and serviceable
Jan 04 2017
Guillaume Piolat via Digitalmars-d-announce=20 <digitalmars-d-announce puremagic.com> napsal St, led 4, 2017 v 11=E2=88=B6= 48=20 :On Friday, 30 December 2016 at 04:19:47 UTC, apz28 wrote:Yes he can but I still prefer it for documentation purposes :)This is my first package to learn D. Suggestion for improvement is=20 welcome. =20 https://github.com/apz28/dlang-xml=20 Welcome here! =20 - you don't have to commit .sln files, dub can generate them as needed - that is for a package that will be reused you can use dub :) - no need to use property, there was a recent discussion about it. I=20 think you can ignore it altogether.=20 - you can use "final" before a class declaration to have all methods=20 be final =20 final class C { /* all methods are final /=3D }Most common and IMHO better pattern is put final as first thing in=20 class like this: class C { final: // all methods after this are final } It has some advantages (class C is not final so you can still use=20 inheritance), marking class final does not need to mean all methods are final (it=20 makes sense to mark them and in curent implementation it is) you can still add easy one method which is virtual. To be fair I=20 mostly use struct instead of final clases=20 =20 - no need for "public import std.exception : Exception;" to use=20 Exception =20 imho the XML parser to beat in our ecosystem is kxml, which is small=20 and serviceable=
Jan 04 2017
On Wednesday, 4 January 2017 at 22:48:30 UTC, Guillaume Piolat wrote:On Friday, 30 December 2016 at 04:19:47 UTC, apz28 wrote:1. no need for "public import std.exception Fixed 2. Compare to kxml - kxml seem be faster but - kxml is still missing various xml function, such as prefix, custom entity, load from file, sax ... - kxml do not pass the test ibm suit (not able to evaluate further) (https://github.com/lodo1995/experimental.xml/tree/master/tests/ibm). Died with range violation xml.d(516) for "<doc><![CDATA[</doc>"This is my first package to learn D. Suggestion for improvement is welcome. https://github.com/apz28/dlang-xmlWelcome here! - you don't have to commit .sln files, dub can generate them as needed - that is for a package that will be reused you can use dub :) - no need to use property, there was a recent discussion about it. I think you can ignore it altogether. - you can use "final" before a class declaration to have all methods be final final class C { /* all methods are final /= } - no need for "public import std.exception : Exception;" to use Exception imho the XML parser to beat in our ecosystem is kxml, which is small and serviceable
Jan 05 2017