issue-#43 eliminating the code procedure size limit of 256

Locked

Should we include the changes of branch issue-#43 into master?

Yes
6
86%
No
0
No votes
Abstain
1
14%
More research is needed
0
No votes
 
Total votes: 7

User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

issue-#43 eliminating the code procedure size limit of 256

Post 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
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#43 eliminating the code procedure size limit of 2

Post 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;
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#43 eliminating the code procedure size limit of 2

Post 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
cfbsoftware
Posts: 204
Joined: Wed Sep 18, 2013 10:06 pm
Contact:

Re: issue-#43 eliminating the code procedure size limit of 2

Post 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.
User avatar
Josef Templ
Posts: 2048
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#43 eliminating the code procedure size limit of 2

Post 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
Locked