Re: C interpreter

  • From: Kerneels Roos <kerneels@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Fri, 23 Jul 2010 09:26:52 +0200

Hi. I can not imagine learning something like C by using an interpreter
similar to the Python interpretor for example. With Python it makes some
sense since Python has list comprehensions like:
[x for x in range(10) if x % 2 == 0]

which will produce a list of even numbers, and things like array / list
slices and even regular expressions.

To test these things  on the fly an interpreter makes sense, or even small
functions which you can just copy and paste into the interpreter and then
test them out there.

With C however the playing field is far less esoteric (to my knowledge). The
important concepts that an imperative language like C contributed to the
world of programming languages are, and hence what you want to learn from
studying C are things like:
variables and constatns
arrays
structs
the concept of functions
conditional statements
loop constructs
pointers
bit wise operations
input and output

To me it makes much more sense to make use of code files and a compile, run,
debug cycle to learn how al those work. Especially if one is learning to
program for the first time.

Some of those concepts require a bit of setup code first, so would one have
to type that into the interpreter then first every time?

I would advise you to stick to files and compiling and running your code --
that's how C works. Also, with an interpreter you can get way different
errors than with a compiler. At the end of the day your goal is to use a
compiler, why not start with that from square one?

Hope this helps.


On Thu, Jul 22, 2010 at 7:27 PM, Øyvind Lode <oyvind.lode@xxxxxxxxx> wrote:

> Ch is both a C and C++ interpreter apparently.
> I'll download it and have a look.
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Arthur Pirika
> Sent: 22. juli 2010 18:29
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: C interpreter
>
> I've been meaning to try that, also. I've heard it's good though, and
> wouldn't mind a c++ interpreter, if such a thing even exists? lol.
>
> Arthur
> ----- Original Message -----
> From: "Øyvind Lode" <oyvind.lode@xxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Friday, July 23, 2010 3:56 AM
> Subject: C interpreter
>
>
> > Hi all:
> >
> > Does someone know a good C interpreter?
> > I'm trying to learn C and I would like a C interpreter to assist me.
> > It would be much faster to type some C statements in the interpreter and
> > get
> > the output instantly...
> >
> > I know it is very important to also learn to know your compiler, but for
> > fast testing of code I think an interpreter is useful.
> > I found one called Ch interpreter.
> > Have someone here used Ch?
> >
> > __________
> > View the list's information and change your settings at
> > //www.freelists.org/list/programmingblind
> >
> >
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>


-- 
Kerneels Roos
Cell/SMS: +27 (0)82 309 1998
Skype: cornelis.roos

Other related posts: