[GSoC 2020] Coding starts

Kai Torben Ohlhus <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
Dear Abdallah,

Again, thank you for your last blog post.  Your timeline looks great.

Your code example was nice to play around with and to fresh up my memory
about RapidJSON.  One thing I noticed was, that you avoided range-based
for loops (C++11) [1].  E.g.

  for (Value::ConstMemberIterator itr = d1.MemberBegin ();
       itr != d1.MemberEnd () ; ++itr)
    {
      if (! itr->value.IsNumber ())
        error ("values must be numbers");
    }

versus

  for (const auto& itr : d1.GetObject ())
    {
      if (! itr.value.IsNumber ())
        error ("values must be numbers");
    }

Since about 2016 [2] Octave uses C++11.  Some features, as shown above,
make the code more readable and less error prone.  But looking at Andy's
implementation, maybe we will not get too deep into it.

Another small but important remark is to not copy any text, code,
anything from Matlab.

> "My goal here is to make the test suite covers all cases that
> jsonencode and jsondecode cover in the official documentation of
> MATLAB [...]"

Some modifications should be made.

Are you going to push the code for your test suite in your GitHub repo
[3]?  I want to check regularly about the progress.

Good luck with your exams.  After they are finished, we can have another
video chat, if you don't like to talk before that.

Happy hacking,
Kai


[1] https://rapidjson.org/md_doc_tutorial.html#autotoc_md47
[2]
https://lists.gnu.org/archive/html/octave-maintainers/2016-02/msg00141.html
[3] https://github.com/Abdallah-Elshamy/octave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.