Should we use dot instead of comma as concatenation operator?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Should we use dot instead of comma as concatenation operator?

ExsonQu
Administrator
Dear all,

                 Thank you for your contribution to webERP!

                 I've found that comma is used instead of dot to concatenate strings.  The googled result shows that comma is a little fast than dot. But I think the comma change will make a impression that lots changes happened. It'll be a heavy load for those users to maintain a customization file.

                 Should we not use the comma except where comma has to be used?

                 Thanks and best regards!

                 Exson
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

phildaintree
Yes ... However, I really don't think the gains are significant - at
least not enough  to make such massive changes worthwhile.

To explain my thinking more fully, as you know, I prefer that if the
change is to be made then all the scripts should be coded in the same
consistent way throughout, so far as humanly possible. So this would
require that the change must be made everywhere not just in some scripts
with other scripts then becoming inconsistent with those changed scripts.
Such a fundamental change to the code is so pervasive that every script
would need to be modified and the risk of errors creeping in with such a
huge amount of editing is too great to warrant consideration of this change.

So, I prefer not to change this please.

Phil

Phil Daintree
Logic Works Ltd - +64 (0)275 567890
http://www.logicworks.co.nz

On 21/07/16 19:54, ExsonQu wrote:

> *Dear all,*
>
>                   Thank you for your contribution to webERP!
>
>                   I've found that comma is used instead of dot to concatenate
> strings.  The googled result shows that comma is a little fast than dot. But
> I think the comma change will make a impression that lots changes happened.
> It'll be a heavy load for those users to maintain a customization file.
>
>                   Should we not use the comma except where comma has to be
> used?
>
>                   Thanks and best regards!
>
>                   Exson
>
>
>
> --
> View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639.html
> Sent from the web-ERP-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
If anyone is wondering about the persistently nasty comments made by Tim Schofield and wants the full story please see: http://timschofield.blogspot.com/ Hell hath no fury like a woman (or Tim) scorned
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

gsavix

Hi. IMO there are historical reason and meaning to use dot for concat.  Many languages ISO conform use comma for decimal point for numbers. By the way file t format csv use other char for represent field delimit.
See locale var environment for better understant why comma use is not a standard nor good idea.
Regards .

Em 21/07/2016 05:56, "Phil Daintree" <[hidden email]> escreveu:
Yes ... However, I really don't think the gains are significant - at
least not enough  to make such massive changes worthwhile.

To explain my thinking more fully, as you know, I prefer that if the
change is to be made then all the scripts should be coded in the same
consistent way throughout, so far as humanly possible. So this would
require that the change must be made everywhere not just in some scripts
with other scripts then becoming inconsistent with those changed scripts.
Such a fundamental change to the code is so pervasive that every script
would need to be modified and the risk of errors creeping in with such a
huge amount of editing is too great to warrant consideration of this change.

So, I prefer not to change this please.

Phil

Phil Daintree
Logic Works Ltd - <a href="tel:%2B64%20%280%29275%20567890" value="+64275567890">+64 (0)275 567890
http://www.logicworks.co.nz

On 21/07/16 19:54, ExsonQu wrote:
> *Dear all,*
>
>                   Thank you for your contribution to webERP!
>
>                   I've found that comma is used instead of dot to concatenate
> strings.  The googled result shows that comma is a little fast than dot. But
> I think the comma change will make a impression that lots changes happened.
> It'll be a heavy load for those users to maintain a customization file.
>
>                   Should we not use the comma except where comma has to be
> used?
>
>                   Thanks and best regards!
>
>                   Exson
>
>
>
> --
> View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639.html
> Sent from the web-ERP-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

Rafael Chacón
Hi,

In PHP, developers had decided to do PHP friendly to people who come from different language backgrounds (C++, Pearl, Python, etc.). This is the reason that we have many ways to do the same thing. E.g. redundant functions like die() and exit(). See: http://stackoverflow.com/questions/1795025/what-are-the-differences-in-die-and-exit-in-php, http://www.beastwithin.org/users/wwwwolf/code/phprant.html.

In the case of comma and dot inside a echo, there is a difference more than execution time:

The use of dot is like to:
// Create a concatenated variable:
$to_output = $a + $b + ... +$z;
// Then, output that variable:
echo $to_output;

The use of comma is like to:
// Output a list of variables:
echo($a, $b, ..., $z);


To create that concatenated variable before output is the reason that "echo $a . $b . ... . $z;" outlast "echo $a, $b, ..., $z;" in execution time. In other programming languages, concatenate variables has others implications: all variables must be the same type. In PHP, in general, we do not have such problem (mixture of variables types); some exceptions: &, {}, [], non ISO-8859-1, non UTF-8_lower_part. Except in "class.pdf.php" script, I do not expect more issues with mixture of variables types.

About use: I use and I recommend to use a list of variables instead of concatenate them before output. I found it "more clear" for beginner programmers.

About changes: we can do them in on step, but i prefer to do one-by-one and test script; tracking bugs between minor changes (not related with bug) is very difficult.

Keeping customised versions: I can not too much help. I use LibreOffice to compare changes before merge them.

Best regards, Rafael.



2016-07-21 7:19 GMT-06:00 gilberto dos santos alves <[hidden email]>:

Hi. IMO there are historical reason and meaning to use dot for concat.  Many languages ISO conform use comma for decimal point for numbers. By the way file t format csv use other char for represent field delimit.
See locale var environment for better understant why comma use is not a standard nor good idea.
Regards .

Em 21/07/2016 05:56, "Phil Daintree" <[hidden email]> escreveu:
Yes ... However, I really don't think the gains are significant - at
least not enough  to make such massive changes worthwhile.

To explain my thinking more fully, as you know, I prefer that if the
change is to be made then all the scripts should be coded in the same
consistent way throughout, so far as humanly possible. So this would
require that the change must be made everywhere not just in some scripts
with other scripts then becoming inconsistent with those changed scripts.
Such a fundamental change to the code is so pervasive that every script
would need to be modified and the risk of errors creeping in with such a
huge amount of editing is too great to warrant consideration of this change.

So, I prefer not to change this please.

Phil

Phil Daintree
Logic Works Ltd - <a href="tel:%2B64%20%280%29275%20567890" value="+64275567890" target="_blank">+64 (0)275 567890
http://www.logicworks.co.nz

On 21/07/16 19:54, ExsonQu wrote:
> *Dear all,*
>
>                   Thank you for your contribution to webERP!
>
>                   I've found that comma is used instead of dot to concatenate
> strings.  The googled result shows that comma is a little fast than dot. But
> I think the comma change will make a impression that lots changes happened.
> It'll be a heavy load for those users to maintain a customization file.
>
>                   Should we not use the comma except where comma has to be
> used?
>
>                   Thanks and best regards!
>
>                   Exson
>
>
>
> --
> View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639.html
> Sent from the web-ERP-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

gsavix
+1 from me. you get the point.

2016-07-25 12:49 GMT-03:00 Rafael Chacón <[hidden email]>:
Hi,

In PHP, developers had decided to do PHP friendly to people who come from different language backgrounds (C++, Pearl, Python, etc.). This is the reason that we have many ways to do the same thing. E.g. redundant functions like die() and exit(). See: http://stackoverflow.com/questions/1795025/what-are-the-differences-in-die-and-exit-in-php, http://www.beastwithin.org/users/wwwwolf/code/phprant.html.

In the case of comma and dot inside a echo, there is a difference more than execution time:

The use of dot is like to:
// Create a concatenated variable:
$to_output = $a + $b + ... +$z;
// Then, output that variable:
echo $to_output;

The use of comma is like to:
// Output a list of variables:
echo($a, $b, ..., $z);


To create that concatenated variable before output is the reason that "echo $a . $b . ... . $z;" outlast "echo $a, $b, ..., $z;" in execution time. In other programming languages, concatenate variables has others implications: all variables must be the same type. In PHP, in general, we do not have such problem (mixture of variables types); some exceptions: &, {}, [], non ISO-8859-1, non UTF-8_lower_part. Except in "class.pdf.php" script, I do not expect more issues with mixture of variables types.

About use: I use and I recommend to use a list of variables instead of concatenate them before output. I found it "more clear" for beginner programmers.

About changes: we can do them in on step, but i prefer to do one-by-one and test script; tracking bugs between minor changes (not related with bug) is very difficult.

Keeping customised versions: I can not too much help. I use LibreOffice to compare changes before merge them.

Best regards, Rafael.



2016-07-21 7:19 GMT-06:00 gilberto dos santos alves <[hidden email]>:

Hi. IMO there are historical reason and meaning to use dot for concat.  Many languages ISO conform use comma for decimal point for numbers. By the way file t format csv use other char for represent field delimit.
See locale var environment for better understant why comma use is not a standard nor good idea.
Regards .

Em 21/07/2016 05:56, "Phil Daintree" <[hidden email]> escreveu:
Yes ... However, I really don't think the gains are significant - at
least not enough  to make such massive changes worthwhile.

To explain my thinking more fully, as you know, I prefer that if the
change is to be made then all the scripts should be coded in the same
consistent way throughout, so far as humanly possible. So this would
require that the change must be made everywhere not just in some scripts
with other scripts then becoming inconsistent with those changed scripts.
Such a fundamental change to the code is so pervasive that every script
would need to be modified and the risk of errors creeping in with such a
huge amount of editing is too great to warrant consideration of this change.

So, I prefer not to change this please.

Phil

Phil Daintree
Logic Works Ltd - <a href="tel:%2B64%20%280%29275%20567890" value="+64275567890" target="_blank">+64 (0)275 567890
http://www.logicworks.co.nz

On 21/07/16 19:54, ExsonQu wrote:
> *Dear all,*
>
>                   Thank you for your contribution to webERP!
>
>                   I've found that comma is used instead of dot to concatenate
> strings.  The googled result shows that comma is a little fast than dot. But
> I think the comma change will make a impression that lots changes happened.
> It'll be a heavy load for those users to maintain a customization file.
>
>                   Should we not use the comma except where comma has to be
> used?
>
>                   Thanks and best regards!
>
>                   Exson
>
>
>
> --
> View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639.html
> Sent from the web-ERP-developers mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers




--
gilberto dos santos alves
+55(11)9-8646-5049
sao paulo - sp - brasil





------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

ExsonQu
Administrator
In reply to this post by Rafael Chacón
Hi, Rafael,

               Thank you for your explanation.
               I think currently the problem is not technical issue. It's about keep alignment within the application. And as I point out, there are lots of users have kept their own version, but when we just change dot to comma, it does no change actually for them, but the code seems changed a lot. It make them hard to maintain and update.
               So I suggest at least NOT change code with dot to comma unless you develop some new code.
               Thanks and best regards!
               Exson
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

Rafael Chacón
Hi Exson,

Yes, I understand you. We also have customised versions (e.g. we use paper size "letter" instead of "A4", so every time one printing script is modified, we have to merge those changes in our scripts).

As you probably could see, I prefer to make the changes gradually as we fix or develop code.

Probably the best way is to modify all the scripts at the same time. That will generate a lot of work at that time, but it is supposed to not have to go back to merge these improvements in the future.

That might be the way to: eliminate the use of ~/includes/class.pdf.php, replace webERP code with new PHP functions (only those that  have more than 36 months old, e.g. calendar functions), update the css classes (e.g. ".text-center" instead our ".centre" class).

Personally, I do not like the idea of the massive changes. Although they may be simple, these changes make hard the search of bug sources because they introduce versions no related with the error.

It occurs to me that we could do a "census" of customised versions and try to include these changes in the major version of webERP. Thus: (1) there would no need to merge changes;(2) the webERP is enriched with new options to meet needs that currently does not. Comments ?

Best regards, Rafael

2016-07-30 19:52 GMT-06:00 ExsonQu <[hidden email]>:
*Hi, Rafael,*

               Thank you for your explanation.
               I think currently the problem is not technical issue. It's
about keep alignment within the application. And as I point out, there are
lots of users have kept their own version, but when we just change dot to
comma, it does no change actually for them, but the code seems changed a
lot. It make them hard to maintain and update.
               So I suggest at least NOT change code with dot to comma
unless you develop some new code.
               Thanks and best regards!
               Exson




--
View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639p4658646.html
Sent from the web-ERP-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Should we use dot instead of comma as concatenation operator?

Pak Ricard
Hi all:

A bit off-topic but, here comes my 2-cents.

Most of us (I guess) end up with customised versions, to adapt webERP to our real environment and needs. I personally commit into the project all the modifications, customisation, etc that can be good for general use, but some of them too specific due to local legal regulations, or very custom ways to do certain things are kept in my private webERP. I guess most of us follow roughly the same standards.

Life managing and merging "my" webERP with SVN was a nightmare and full of errors until I started working with GIT (thanks Tim!). Since then all merges are almost automatically managed and GIT points out where there are potential conficts and can be solved quite easily. I keep my repository in bitbucket.com and manage it with SourceTree software. I only wished I started using it few years before. 

So, I do not think we should stop, cancel or delay any improvements just because of the customised versions, as we could end up paralyzed. If it's good for webERP and we can do it, I think we should move ahead

Probably most of you already work with GIT, so this email is pointless, but otherwise I think it's worth exploring it. Your merge life can be extremely simple






Regards,
Ricard

2016-08-01 9:58 GMT+08:00 Rafael Chacón <[hidden email]>:
Hi Exson,

Yes, I understand you. We also have customised versions (e.g. we use paper size "letter" instead of "A4", so every time one printing script is modified, we have to merge those changes in our scripts).

As you probably could see, I prefer to make the changes gradually as we fix or develop code.

Probably the best way is to modify all the scripts at the same time. That will generate a lot of work at that time, but it is supposed to not have to go back to merge these improvements in the future.

That might be the way to: eliminate the use of ~/includes/class.pdf.php, replace webERP code with new PHP functions (only those that  have more than 36 months old, e.g. calendar functions), update the css classes (e.g. ".text-center" instead our ".centre" class).

Personally, I do not like the idea of the massive changes. Although they may be simple, these changes make hard the search of bug sources because they introduce versions no related with the error.

It occurs to me that we could do a "census" of customised versions and try to include these changes in the major version of webERP. Thus: (1) there would no need to merge changes;(2) the webERP is enriched with new options to meet needs that currently does not. Comments ?

Best regards, Rafael

2016-07-30 19:52 GMT-06:00 ExsonQu <[hidden email]>:
*Hi, Rafael,*

               Thank you for your explanation.
               I think currently the problem is not technical issue. It's
about keep alignment within the application. And as I point out, there are
lots of users have kept their own version, but when we just change dot to
comma, it does no change actually for them, but the code seems changed a
lot. It make them hard to maintain and update.
               So I suggest at least NOT change code with dot to comma
unless you develop some new code.
               Thanks and best regards!
               Exson




--
View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Should-we-use-dot-instead-of-comma-as-concatenation-operator-tp4658639p4658646.html
Sent from the web-ERP-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Loading...