Related articles |
---|
[2 earlier articles] |
Re: Pointers to "why C behaves like that ?" mwotton@cse.unsw.edu.au (Mark Alexander Wolton) (2002-11-15) |
Re: Pointers to "why C behaves like that ?" skwong@sun80.acae.cuhk.edu.hk (WONG SAI-KEE) (2002-11-15) |
Re: Pointers to "why C behaves like that ?" jacob@jacob.remcomp.fr (jacob navia) (2002-11-15) |
Re: Pointers to "why C behaves like that ?" christian.bau@freeserve.co.uk (Christian Bau) (2002-11-17) |
Re: Pointers to "why C behaves like that ?" Gayev.D.G.=?iso-8859-1?Q?=3Cdg=E0ev=40mail=2Eru=3E (2002-11-17) |
Re: Pointers to "why C behaves like that ?" bobduff@shell01.TheWorld.com (Robert A Duff) (2002-11-17) |
Re: Pointers to "why C behaves like that ?" jamesp_spam_me_not@silver-future.com (James Powell) (2002-11-17) |
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-17) |
Re: Pointers to "why C behaves like that ?" mwotton@cse.unsw.edu.au (Mark Alexander Wolton) (2002-11-20) |
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-20) |
Re: Pointers to "why C behaves like that ?" marcov@toad.stack.nl (Marco van de Voort) (2002-11-20) |
Re: Pointers to "why C behaves like that ?" n368714668.ch@chch.demon.co.uk (Charles Bryant) (2002-11-20) |
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-11-20) |
[58 later articles] |
From: | "James Powell" <jamesp_spam_me_not@silver-future.com> |
Newsgroups: | comp.compilers |
Date: | 17 Nov 2002 23:19:03 -0500 |
Organization: | Compilers Central |
References: | 02-11-059 02-11-087 |
Keywords: | design |
Posted-Date: | 17 Nov 2002 23:19:03 EST |
Original-Sender: | jamesp@silver-future-spam-me-not.com |
I'm building up a scripting language right now from a FORTH basis, and
I find that variable declarations and typed variables are a boon which
require additional work from the language implementor to enable the
user to write better code. Think of the evolution from machine code:
no types, no variable names. The language developer works some more
and we have variable names (macro assembly). More work and we have
syntax for subroutines. More work and we have named arguments to
subroutines. Yet more and we have typed variables. All of these
features are syntactic sugar on top of machine code, and they all let
the compiler find errors like the variable name error in Jacob's
example.
Writing compilers that don't do any of this is much easier, which is
why many early languages (BASIC, assembly, LISP, FORTH) don't do it.
These features are one of the things that made C so successful, and
obtaining them required the development of tools like YACC to make the
construction of more sophisticated compilers possible.
James
Return to the
comp.compilers page.
Search the
comp.compilers archives again.