Hi

On 2012.02.28 09:56, James Briant wrote:


On Tue, Feb 28, 2012 at 12:50 AM, Miljenko Cvjetko <[email protected] <mailto:[email protected]>> wrote:


    Why would partial classes be problem?
    It is just splitting code into  multiple files

Its no different than having #if/#endif, which you agreed was bad in your earlier email. But instead of the compiler hitting an #if and ignoring what's next, the compiler is never given the file in the first place. Its no different.
I see it differently.
SomeClass.MTch.cs is not in WP7 project it is added as delta in MTch project
SomeClass.M4A.cs is not in WP7 or MTch project it is added as delta in M4A project

SomeClass.cs is pressent as normal file in WP7 project and as link in other.

.. so everthing is given to compiler in every project! No ifdefs (they are almost like gotos for me)


"I can't do what I want with the compiler, so I'll do it with a preprocessor or makefile".
Or Build Action: something that does not compile
We don't have that either...

When file or link is there - it compiles!

Basically you're building three classes that have the same name but are different. Its a hack.

or am I extending one class across multiple files w/o hack - just plain organization/management??

I can remember STL requirements (rules and recommendations) with ctor, cctor (copy),
assigment op, less, equals and other derived relational ops for class.
Today I write something similar too in SomeClass.Operators.cs and see no evil!

Not speaking that in not-linked-file in WPF/WF project I can write SomeClass.Serializable

[Serializable]
public partial SomeClass {} // that's all I have desktop serialization only on desktop project!!

cos Attributes and some keywords (abstract) are additive accross partial classes.

the only problem I see with my approach:
I have to determine "platform smallest common subset/denominator of features" and that is WP right now. If microsoft decides to add almost everything what is on desktop and maybe something from asp.net (this will not happen) and I find it usefull and put asp.netserver in my mobile app (this will not happen too - for a long time) then WP (silverlight) is not smallest
subset, so I have to reorganize my projects...
Until then MT and M4A are feature-supersets of WP-SL for me...

regards

mel

--
Miljenko Cvjetko dipl.ing. ET
        Direktor/CEO
        Projektant rjes(enja/Solution Architect 
        Razvojni programer/Senior developer
        Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to