Duck-typed script languages, or statically typed "compiled" languages?
-
Programming is a lot like picking at a scab. You probably shouldn't but you inevitably do. Does anybody set out to pick at scabs? I suppose a startled would-be psychologist. Notices all the blood that pours out, realizes it's not as painful as he imagined such a flow to be, and then wonders why he would need to stop it now that it's continuing. Let me ask you a question. When you think of Python, do you shiver a little?
RedDk wrote:
When you think of Python, do you shiver a little?
I've been doing some Python programming for a BeagleBone SBC. And yes, I shiver. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
Duncan Edwards Jones wrote:
with Scratch
I actually wish programming was just like that! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
Or we just had the IDE that Project Spark[^] uses!
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
As someone who has actually taught people to code... First, everyone is different. Second, what is usually lacking is are students that understand how to solve a problem! The answer is always, it depends. I had some kids who developed Lego NXT apps as their first programming with a GUI. I had college kids learning Java. (They just wanted to pass the class, mostly). What is important, to me. Is an expressive set of problems the student is interested in solving. Teaching them to read/interpret code first, then to write code. I found that giving students a working solution, and having them make small changes was the fastest way to wet their whistles. The naturals would excel on their own pretty quickly. The others started to pick up the "Oh, if I change this, this changes". Then from there it gets easier, because they have a basis of the language and how to make it run.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
First languages I ever learned were the Motorola M6800 and DEC PDP-8 & 12 assembly languages in the late 1970's. The first language I ever did anything actually useful to anyone else in was REXX in 1980. It's a duct-typed script language. I created a questionnaire application used in rating courses and instructors at the IBM Ed center. I loved REXX. The datatype of a variable was context-of-use-dependent. If x contained "100" then x would (automagically) be a string in string situations, or an integer or float in those situations. I still think it's a pity it never became mainstream. If someone is learning programming... hmmmm My bottom line criterion would be: least distraction from the learning experience My REXX experience (and perhaps that of millions of MS-DOS BASIC users) indicates to me that the advantages of duct-typed script languages for neophytes are: - all you need is a text editor (IDE's can be learned later!) - the runtime environment can be simplified (the person isn't also, say, learning windowing concepts) - produces feedback for their efforts quickly (the experience of delight is important I think) - strong typing can be learned later - they are imperative and that form of programming is (IMO) more intuitive and therefore easier to grasp.
Cheers, Mike Fidler "I intend to live forever - so far, so good." Steven Wright "I almost had a psychic girlfriend but she left me before we met." Also Steven Wright "I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
First, understand that dynamic vs static typing and script vs compiled are NOT tied together. Second, I recommend losing the pejorative terms such as "duck-typed" as well. Beyond that, it would depend more on the student's goals and objectives. If they are hoping to become professional developers, then it would help to look at what the local market (or market they want to work in) is looking for. If they are simply looking to play around, then you need to ask what platform they most like, and more.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
I have a slightly different perspective on this. I think the language matters less and the environment matters more. In other words, to an absolute beginner, the important thing is understanding what the cryptic words and squiggly characters are going to do within that little world the language resides in and how the language's actions are useful to them. The problem with most contrived tutorials like "make an array of addresses" or "make the kitty move across the screen until it hits the side wall" is that it's not something they want or need to do and their interest wanes quickly. That 2nd reference isn't a dig at Scratch at all, because I think Scratch is awesome, and the best way I've seen to help young kids understand loops and if/then logic gates. However, if Scratch doesn't ignite more curiosity like, "how can I make the kitty navigate through a maze?", then they're not going to experiment more. If it's a kid and they're into Minecraft, then learning how to write a Minecraft mod is a perfect task that will keep their experimental fires burning because they want to see that mod work. Another possibility is writing a basic iPhone app, because it's exciting being able to show your friends, "look at that app in the App Store, I wrote that!", even if the app is just a button you push and it shows a smiley face. Here's something that sparked my son's curiosity: He was trying to figure out why a Javascript game on a website wasn't working right, so I said, "let's check out the code and see if we can figure out what's going on," and he was blown away that you could click View Source and start poking around with the HTML and Javascript. It really piqued his curiosity about how you can make web pages do things. If it's an adult and they want to automate some tasks in Word or Excel, then showing them how to write some VBA code is a good intro to programming. Regarding a specific language, I think Ruby is a pretty nice language, and for a beginner it's nice that it doesn't require semicolons. I don't know Python well but it's nice that it also doesn't require semicolons. Python does require indents/whitespace--not sure if that is confusing or helpful to a beginner? I learned Perl and VB6 at the same time and I remember the case-sensitivity of Perl confused me and it was nice that VB didn't have that, but I also remember that VB's linebreak requirements (like you have to say "If a=b Then" and not "If a=b --linebreak-- Then") confused me and I liked that Perl was fine with splitting things onto a new line. One neat
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
Having actually done some teaching of programming to high school kids, I can attest that Python is a nice language to start with. In particular, Python notebooks are a great way to get your feet wet in programming, and teachers can put together nice "cheat sheets" that are actually executable using the notebooks. I would stay far away from any compile-link-run environment. Goodness, why inflict that on any beginner when there are such nicer options around.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
Having actually done some teaching of programming to high school kids, I can attest that Python is a nice language to start with. In particular, Python notebooks are a great way to get your feet wet in programming, and teachers can put together nice "cheat sheets" that are actually executable using the notebooks. I would stay far away from any compile-link-run environment. Goodness, why inflict that on any beginner when there are such nicer options around.
SirMungus wrote:
Goodness, why inflict that on any beginner when there are such nicer options around.
Well, in C# it's pretty transparent, but you make a good point. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
I vote for the non-existing language that combines:
- Has optional types like PHP5
- Object oriented programming and meta programming like C++
- Dynamic like Javascript
- Have syntax similar to C
- Natively provided libraries are documented like Java
I know I have big and unrealistic dreams, but every language I learned goes like 30%-60% on the right track, the rest creates a lot of "why?" questions in my head.
-
Do I have to pick one of those? I'd start with assembly. It's structurally simple and easy to learn incrementally. "Literally a list of instructions" is the simplest model to get used to.
Dude, I can't tell if you're serious. Because if you are, I'd say, "YIKES!" (and more below). If you're not, then I'd be happy to pile on with more helpful suggestions, like "Forget Assembly. If you really want to dip your toes in the water you should start out with machine language -- go straight to the binary, so you can really understand the way the computer thinks!" ...And if I really have to explain my "YIKES" comment... Assembly is a *marginally* useful language to explore for advanced coders. It is absolutely NOT what beginners should be introduced to. That's like giving entry-level math students a calculus book. Seriously. Yikes. Please never teach an intro course.
-
i'd go with the simplest dynamically-typed scripting language i could find. introducing the language plus a compiler & linker is just too much at once.
-
Dude, I can't tell if you're serious. Because if you are, I'd say, "YIKES!" (and more below). If you're not, then I'd be happy to pile on with more helpful suggestions, like "Forget Assembly. If you really want to dip your toes in the water you should start out with machine language -- go straight to the binary, so you can really understand the way the computer thinks!" ...And if I really have to explain my "YIKES" comment... Assembly is a *marginally* useful language to explore for advanced coders. It is absolutely NOT what beginners should be introduced to. That's like giving entry-level math students a calculus book. Seriously. Yikes. Please never teach an intro course.
I actually am serious. I don't disagree about the low relative usefulness. Of course assembly is not a convenient or easy-to-use language. But none of that matters. At its core, assembly is simple. Literally a list of instructions, that is something everyone immediately understands. The syntax is trivial too. What people have trouble with is decomposing problems into the right parts, which is a bit harder in assembly. But you can jump right in. Other languages suffer the problem that in order to do anything (or even *read* anything), a lot of pointless syntax and other magic incantations have to be learned.
kdmote wrote:
Seriously. Yikes. Please never teach an intro course.
Too late. I'm a teaching assistant for a computer architecture course. First year course, straight to assembly (architecture too, of course). They also learn Java in parallel, where they get confused about declarations and types, many stay confused until they take a course in compiler construction. Almost no one is fundamentally confused about assembly, they just find it hard to use.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
I would pick statically-typed language to teach someone new to programming. Duck-typed languages, even though they are omitted from syntax, the binary code still deal with typed data. Better fill their heads with what really are under the syntax to begin with. That way they are better equipped to understand when/if they switch to duct-type languages. Teaching new programmer with duct-type languages is equivalent to speaking a foreign language with your interpreter standing by your side.
-
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you.
DangerBunny wrote:
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you.
:laugh: :laugh: :laugh: OK, that one is going on my blog, my sig, my wall (the physical one), twitter, where ever I can post it. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
-
Dude, I can't tell if you're serious. Because if you are, I'd say, "YIKES!" (and more below). If you're not, then I'd be happy to pile on with more helpful suggestions, like "Forget Assembly. If you really want to dip your toes in the water you should start out with machine language -- go straight to the binary, so you can really understand the way the computer thinks!" ...And if I really have to explain my "YIKES" comment... Assembly is a *marginally* useful language to explore for advanced coders. It is absolutely NOT what beginners should be introduced to. That's like giving entry-level math students a calculus book. Seriously. Yikes. Please never teach an intro course.
-
Do I have to pick one of those? I'd start with assembly. It's structurally simple and easy to learn incrementally. "Literally a list of instructions" is the simplest model to get used to.
-
Don't agree... There is a reason people don't use GOTO in c anymore... Assembly is a whole bunch on GOTOs with some non-portable code.
"Program testing can be used to show the presence of bugs, but never to show their absence." << please vote!! >>
Yes, but that reason was that it doesn't scale to large programs and is in general hard to use, not that it's hard to learn or to at least understand the fundamentals. The point of a first language is not writing large programs in it so that aspect doesn't matter.
-
Examples of duck-typed, script languages: Javascript X| (what, me biased?) Ruby Python Examples of statically typed compiled languages: C C++ C# Go This isn't a question of which you think is better (I know, the answer is "it depends") but feel free to answer that question, and why (particularly what it depends on). My question is, if you were asked "how should I start learning programming?" would you a recommend duck-typed script languages or statically typed compiled language? Does it depend on what age the person is (for example, your kid, vs. a coworker interested in programming)? Which would you prefer to teach to someone new to programming? Why am I asking this? Because several sources of Python that I've encountered consider it a good learning language, and I'm curious what the experts here think! Bonus (virtual) points for whether you'd pick an imperative programming language or a functional programming language! Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!