hopscc wrote:Depends if you think a major use/desire will be for multiplatform platform independant compiled apps - need a few other things before thats a reality
It's a reality today:
1 - Write a console program in Cobra on Windows XP using .NET
2 - Copy the .exe--not the source--to a Mac
3 - After installing Mono, run with "mono foo.exe"
CLR byte code is not platform specific. Neither is the format for assemblies.
You can do any kind of algorithms, data structures, networking, web, etc. you want. Ideally, you could do WinForms as well, but I haven't had good experiences running WinForms on Mac OS X 10.4 Tiger.
If I'm missing something, let me know.
hopscc wrote:Using a default runtime fetch is also problematic since if you write a program that needs a specific newline string regardless of platform ( text network protocol say ) switching platform may cause some unhappiness
Not if we use a new code like \N, and the existing codes (\n and \r) are left as is.
hopscc wrote:I'd suggest duck and run
Allow explicit characters for the compile time (c'\N') and runtime ( c'\R' ??) platform newLine string and the individual parts (c'\n', c'\r'),
Let the developer choose what works for their app and anticipated platform deployment
Hmm - OR explicit chars for platform newline string, compiler setting or compiler directive for whether that's a compile time (compilers platform string) or a
runtime calculated option.....
OTOH worst case is its a recompile on/for the target platform(source portability) - for a commercial app paranoia dictates that you'd do that anyway...
I currently favor:
-- \n and \r are treated the same way as in C# and Python. No special interpretation.
-- \N is for platform newline
-- \N adapts at run-time
For implementation, I guess that means that a string literal containing \N would be broken into "foo" + CobraCore.newLine + "bar". Interpolated strings would have to pay attention as well.
-Chuck