Alex
Al Knows
|
Wednesday, October 31, 2012
Buksna wrote : I wouldn't advise starting to learn programing in C,C++ or C#
Might be too much to comprehend and its really messy to understand unless you invest too much time into it.
Try to go with pascal or pyton to learn basics of coding. I would recommend Pyton before Pascal because of its unique system that forces you to learn to code with style that is readable by others (not sure how I should say this properly)
Once you do grasp basics then you may switch to any other language you want because difference mostly is just in commands while structure is the same
On the other hand I would certainly recommend C# as a first language. It's got all the simplicity and portability (via Mono) as script languages like Python and will prepare you better for native C-like languages. There's nothing wrong with Python, but other than helping teach a programming mindset it's not that useful as a "first language." Pascal is just awful in my opinion.
Each to their own in terms of preferred language, but in my opinion a "recommended first language" should be a language which would give the greatest benefit to learning other languages while being high-level and simple enough to learn by a layman. Languages like Python, LUA, Pascal, Visual Basic, etc. don't give that sort of benefit, only the ease of learning. C# is the best of both worlds and will prime a budding developer much better for going in any direction afterwards, rather than just priming the coder to go in the Python way.
Once someone is proficient in C# it makes picking up languages like Python practically a 5 minute task and it makes learning C/C++ a lot less of a headache. Saying any other language is just like Python or Pascal with different commands and the same structure is just plain wrong. Not even Python and Pascal share identical structure and syntax.
|
Zeth
The Admin
|
Wednesday, October 31, 2012
On the other hand I would certainly recommend C# as a first language. It's got all the simplicity and portability (via Mono) as script languages like Python and will prepare you better for native C-like languages.
Having experience with C# now, I can safely say it's "somewhere inbetween" C and Python but refuses to adopt the extremes (and often advantages) of either. Here are a few points I feel are worth mentioning.
C#'s Reflection core is extremely messy/indirect by comparison to Python's "everything is an object" mentality. Accessing an object's attribute list or class default values require calls on the class type followed by relevant storage and distinguishment of fields from properties. This requires pre-meditated knowledge (in many cases) about the type of data that you are dealing with -- often defeating the purpose of reflection. There are ways of pulling out relevant information needed, but often adds even more overhead to accomplishing a one-line task. I actually ended up having to write my own Accessor class (currently tweaked for Unity) just to try and overcome these shortcomings.
Despite C# being a hard-typed language also, it lacks the flexibility of a language like C where interoperability between types can be assumed. I say this primarily in relation to using data as numeric values such as byte (0 to 127), short (0 to 32767), and int (0 to 2147483647) and their unsigned equivalents without being forced to manually type-cast between each one. This non-strict usage in C is what can make it dangerous, sure, but in that also comes a lot of usability. Additionally, not being able to assume most data types are bool (such as an int/float of 0) for false in a conditional is an infuriating practice that does not exist in any other language I am familiar with.
No support for global or file scoping (or any non-encapsulated data). While I can see the merits of discouraging globally scoped data (as python does), forcing the design mentality on the user is never an option (as python does not). This makes using constants and cross-file data usage much more cumbersome -- albeit somewhat more organized. I personally don't mind this, but a language should NEVER force its own design pattern upon you. My qualm is about giving users the options to use their preferred coding habits regardless of how the language authors feel it should be.
There's nothing wrong with Python, but other than helping teach a programming mindset it's not that useful as a "first language.
Define useful. In the workforce on a business level, sure, not many industry advocates make use of the language. However, you can virtually do anything you'd want to do with another language often much faster with Python. It can provide anything from a file manager to a game engine in less time with cleaner design patterns. Can you elaborate what qualifies it as not useful?
Each to their own in terms of preferred language, but in my opinion a "recommended first language" should be a language which would give the greatest benefit to learning other languages while being high-level and simple enough to learn by a layman. Languages like Python, LUA, Pascal, Visual Basic, etc. don't give that sort of benefit, only the ease of learning.
It sounds like the distinction you are making may be only be a matter of teaching you to learn/utilize type usage with variables. While a typed language obviously has performance benefits, this hardly means it should be promoted and hoisted over dynamic ones as being a superior choice. The performance gap between compiled and dynamic is closing more and more each day -- especially with projects like pypy.
I realize you can argue benefits of knowing a variable type also as being a useful trait, but in all honesty, I'm from the school of thought that a developer should actually understand what all his variables contain and what all his/her functions do before attempting to utilize them. If in doubt or using someone else's code, external API documentation should be used. This and the above paragraph's logic about non-forced design is reason as to why languages forcing public / private / internal / override / virtual / static keyword usage to achieve strict data access, singleton practices, or inheritance commonsense is also unnecessary -- again an aspect Python helps demonstrate.
C# is the best of both worlds and will prime a budding developer much better for going in any direction afterwards, rather than just priming the coder to go in the Python way.
I agree that C# is definitely a "right in the middle" kind of language. Maybe my hesitation in recommendation stems from my "pick an extreme" mentality that suggests users should always forego moderation over working with the categorical pinnacle form (C for compiled, Python for dynamic). I suppose it depends on your end-goal in the entire learning process, however.
Once someone is proficient in C# it makes picking up languages like Python practically a 5 minute task and it makes learning C/C++ a lot less of a headache.
I'm not so sure about that. Of the languages discussed, I learned Python first, followed by C, and then finally C#. I found C# the most challenging and frustrating given my previous experiences dealing with and understanding how their focused forms (C and Python) already worked. If I tried to treat C# just like C or just like Python, it felt restricted at every turn.
This is an important aspect to recognize. A lot of languages can be shifted between without feeling like you're in a whole new realm. For instance, I used to slip between, php, javascript, and python quite a bit and found that there were enough comfortable similarities to scope them in the same realm of usage.
Saying any other language is just like Python or Pascal with different commands and the same structure is just plain wrong. Not even Python and Pascal share identical structure and syntax.
I won't disagree there. I have no idea how Pascal even got inserted in this conversation. Reminds me back when my civil engineering friend was having to learn Matlab (a limited, atrociously syntaxed, and overall dated language) that's STILL used to this day with his field and degree.
|