Page 1 of 1
issue-#43 eliminating the code procedure size limit of 256
Posted: Thu May 14, 2015 8:41 am
by Josef Templ
Since there is not much to discuss about issue-#43 (eliminating the code procedure size limit of 256 bytes)
except if we want it or not, here is the voting about it.
For the issue see
http://redmine.blackboxframework.org/issues/43.
For the changes see
http://redmine.blackboxframework.org/pr ... baa715cef4.
For the user there is no observable difference except that now the code procedures have arbitrary size
up to the overall memory limit.
Gentlemen, please cast your vote.
- Josef
Re: issue-#43 eliminating the code procedure size limit of 2
Posted: Thu May 14, 2015 9:42 am
by DGDanforth
Comment:
Code: Select all
WHILE i > 0 DO DEC(i); s2^[i] := s^[i] END;
is more conveniently written as
Code: Select all
WHILE i > 0 DO DEC(i); s2[i] := s[i] END;
Re: issue-#43 eliminating the code procedure size limit of 2
Posted: Thu May 14, 2015 11:00 am
by Josef Templ
Well, the explicit ^ is used throughout the compiler, i.e. eliminating it here would
break the overall style. There is, however, a separate entry in the CPC 1.7 change list
that, besides other cosmetic changes, refers to eliminating the ^ where it is redundant.
This changes hundreds of places but does not provide any real benefit.
Therefore, I would propose to keep the traditional style for the moment and
revisit it when we we work on the mentioned CPC 1.7 issue.
- Josef
Re: issue-#43 eliminating the code procedure size limit of 2
Posted: Thu May 14, 2015 11:56 am
by cfbsoftware
The published BlackBox Programming conventions state:
7 Dereferencing
The dereferencing operator ^ should be left out wherever possible.
Good
h.next := p.prev.next
Bad
h^.next := p^.prev^.next
While I understand that it is not a priority to change existing code that does not conform (until, perhaps, it needs to be changed for some other reasons) I would recommend that the stated convention be followed for all current and new work.
Re: issue-#43 eliminating the code procedure size limit of 2
Posted: Thu May 14, 2015 6:56 pm
by Josef Templ
Thanks for the votes.
Regarding the dereferencing operator:
It seems that this convention is not even followed by all of the BB authors,
at least not by the compiler author. Personally, I cannot see a big advantage in it.
It is more a matter of personal taste if you prefer the more explicit or the shorter form.
Anyway, we will come back to this in a broader context soon.
The reason why I used the explicit form was that this is also used in the CPC version
and it is also used in the rest of the compiler. IMHO, mixing the conventions also
is disputable although it is not listed explicitly in the programming conventions.
- Josef