Hi Jojo,  I’m trying to figure out how to dump the warnings from xcode where I 
can post them to you.  It will take me some
time to figure this out.


On the other hand, the other topic about casts making things confusing.  I 
think there are probably lots of subtle implications of these automatic casts 
in C++ which programmers don’t realize.  I know that some times cast 
automatically like you mentioned with certain numeric types.  But I also 
understand that the programmer can overload casting operations between his own 
types.  In addition the programmer can create template multiple argument 
functions which the compiler promises to use if the function gets called with 
particular combinations of types.   It should be pretty easy to set up multiple 
ways to describe the casting.  E.g., if there are overloaded casting operators 
transforming A->X, A->Y, X->B and Y->B, and there is a template defined on B 
and you call the template with A, I don’t know what will happen.  Maybe this 
case is specified and everyone understands it.  But certainly when you mix in 
multiple inheritance and functions of multiple arguments and lots of casting 
overloading, it will become difficult for the human being to figure out what is 
going to happen.  And my suspicion is that not all compilers will handle some 
situations the same way.

One thing that makes C++ powerful as it is used today, is that libraries set up 
so many intuitive operator overloadings and generic templates, that the naive 
beginner such as myself can easily write code which compiles and works or at 
least seems to work, but might be horribly inefficient or might fail under 
obscure conditions.  I’ve noticed that somethings just work, and other things 
which should work (in my opinion) don’t.

The case I found recently was that if I declare a variable as a set of objects 
of my class.  I can call container.find(obj).  but if I redefine to use deque 
rather than set, container.find(obj) fails, and on the mac it fails with a 
strange compiler error.  I talked to a C++ expert about this and in his opinion 
it was obvious, but to me it just seemed inconsistent and strange.


Jim


> On 25 Apr 2015, at 14:20, Jojo-Schmitz [via MuseScore Developer] 
> <[email protected]> wrote:
> 
> Hi Jim 
> 
> What you call auto-casting, is really called default argument promotion. So 
> an function/method expecting a double would happily accept a float, a 
> function/method expecting a long would also take an int or short, and 
> without the need on any explicit cast. And this isn't even C++, but plain C. 
> 
> Casts in C++ come in different flavours, see e.g. 
> http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna 
> <http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dyna>
> mic-cast 
> 
> I'm continuously trying to make sure the code compiles without any warning 
> under Windows (as seen on my machine) as well as Linux (as seen on Travis), 
> and also occasionally did some work to fix some warnings in Mac (I usually 
> don't get to see those), but the vast majority of warnings in Mac are just 
> bogus, at least to my understanding. 
> Would be really nice to somehow get them fixed or silenced, as to not miss 
> tree the tree (of a valid warning) in the forest (of bogus ones)... 
> 
> Bye, Jojo 
> 
> -----Original Message----- 
> From: Jim Newton [mailto:[hidden email] 
> <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=0>] 
> Sent: Saturday, April 25, 2015 11:33 AM 
> To: [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=1> 
> Subject: Re: [Mscore-developer] running tests on mac via xcode 
> 
> I also don't understand the C++ concept of casting.  Of course I have a very 
> high level conceptual understanding.  But the whole system seems to get 
> confusing at the extremes.  I.e., if there are many different methods none 
> of which exactly match, and lots of ways to auto-cast the arguments.  Which 
> one has priority, and do we know whether this decision happens the same way 
> on every version of every compiler on every architecture, independent of in 
> which order the files were compiled etc. 
> 
> I am very new to C++.  I'm using xcode on the mac.  When I compile 
> musescore, it compiles with no errors, but nevertheless with lots of 
> warnings.   I'm afraid to fix any of the warnings because they are in code I 
> don't understand.  It would be great if we (the collective developers) could 
> eliminate all the warnings.  Not sure if that is even possible, as perhaps 
> some of the warnings are just plain wrong?  Not sure. 
> 
> 
> 
> 
> 
> 
> 
> -- 
> View this message in context: 
> http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792 
> <http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p75792>
> 09.html 
> Sent from the MuseScore Developer mailing list archive at Nabble.com. 
> 
> ---------------------------------------------------------------------------- 
> -- 
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications Performance 
> metrics, stats and reports that give you Actionable Insights Deep dive 
> visibility with transaction tracing using APM Insight. 
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
> <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________ 
> Mscore-developer mailing list 
> [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=2> 
> https://lists.sourceforge.net/lists/listinfo/mscore-developer 
> <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
> 
> 
> ------------------------------------------------------------------------------
>  
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications 
> Performance metrics, stats and reports that give you Actionable Insights 
> Deep dive visibility with transaction tracing using APM Insight. 
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
> <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________ 
> Mscore-developer mailing list 
> [hidden email] <x-msg://14/user/SendEmail.jtp?type=node&node=7579210&i=3> 
> https://lists.sourceforge.net/lists/listinfo/mscore-developer 
> <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579210.html
>  
> <http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579210.html>
> To unsubscribe from running tests on mac via xcode, click here 
> <http://dev-list.musescore.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7579199&code=amlta2EuaXNzeUBnbWFpbC5jb218NzU3OTE5OXwxMTEzNjI0NTI5>.
> NAML 
> <http://dev-list.musescore.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://dev-list.musescore.org/running-tests-on-mac-via-xcode-tp7579199p7579217.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to