A couple of (ok 4) miscellaneous questions.
Posted: Mon Feb 11, 2008 4:05 pm
1. Why force function/property names to be lowercase?
IMO, this makes it more difficult to use existing .NET libraries. For example, if I look up information on the generic List<T>, I find that is has a property named Count, but in the Cobra Programming Language, I need to remember to lower case it.
Also, not sure how you are implementing the translation, but what happens if I try to use a 3rd party class that has a method that is actually lowercase - are you uppercasing these when you create the C# code. If so, this case would fail. I just ran a quick test and can confirm that this does in fact fail. You run into these case in libraries that have been ported from the Java world.
2. Another case related question deals with Type declarations. Why can I write "var i as int #note lowercase i" but i have to write "var s as String #note uppercase S"?
I know that in another post you state that 'Object' and 'String' are the actual class names so there isn't an 'object' and 'string' like in C# - but continuing that logic, the actual framework types for integers are System.Byte, System.SByte, System.UInt16, System.Int16, System.UInt32, System.Int32, System.UInt64, System.Int64 and for floating point they are System.Single, System.Double, System.Decimal. I won't list them all, but int is a c# alias for System.Int32 and decimal is an alias for System.Decimal and finally string is an alieas for System.String.
3. Can doc strings be accessed in code like Python's __doc__ or are they just a standardized placeholders to document the code?
4. Does the Cobra Programming Language have a line continuation character like Python's backslash?
IMO, this makes it more difficult to use existing .NET libraries. For example, if I look up information on the generic List<T>, I find that is has a property named Count, but in the Cobra Programming Language, I need to remember to lower case it.
Also, not sure how you are implementing the translation, but what happens if I try to use a 3rd party class that has a method that is actually lowercase - are you uppercasing these when you create the C# code. If so, this case would fail. I just ran a quick test and can confirm that this does in fact fail. You run into these case in libraries that have been ported from the Java world.
2. Another case related question deals with Type declarations. Why can I write "var i as int #note lowercase i" but i have to write "var s as String #note uppercase S"?
I know that in another post you state that 'Object' and 'String' are the actual class names so there isn't an 'object' and 'string' like in C# - but continuing that logic, the actual framework types for integers are System.Byte, System.SByte, System.UInt16, System.Int16, System.UInt32, System.Int32, System.UInt64, System.Int64 and for floating point they are System.Single, System.Double, System.Decimal. I won't list them all, but int is a c# alias for System.Int32 and decimal is an alias for System.Decimal and finally string is an alieas for System.String.
3. Can doc strings be accessed in code like Python's __doc__ or are they just a standardized placeholders to document the code?
4. Does the Cobra Programming Language have a line continuation character like Python's backslash?