Subj : Re: Do all programming languages use files? To : comp.programming From : Ed Prochak Date : Thu Sep 01 2005 07:00 am Richard Heathfield wrote: > Ed Prochak said: > > > > > Richard Heathfield wrote: > >> Ed Prochak said: > >> > >> > And there is the less obvious language with Sequence, selection, and > >> > functions (as long as recursion is allowed, iteration can be > >> > implemented via recursion). > >> > >> Then the language has a rather strange form of iteration. It might be a > >> nuisance to do, but it's still iteration. > > > > Recursion and iteration are not the same thing. > > That depends on your point of view! I once worked on a project where we were > converting a load of QBasic programs (written by actuaries) into C. I asked > one of these actuaries why they used recursion so much. His reply was > illuminating: "Quite often we want to do , so we do it, and then we > see if we've done it enough. If not, we do it again!" > > Clearly, he saw no real distinction between recursion and iteration. (Yes > yes yes, I do see your point of view - but there are other points of view!) Whether actuaries understand the difference is irrelevant. There is a real difference. > > >> > and How about languages with only sequence and selection (The loops are > >> > implied in nonprocedural languages like SQL.) > >> > >> I don't really think of SQL as a programming language. It's more of a > >> fairly portable database API. > > > > Depends on the scope of what ia a language. The deveopers thought it > > was a language. It is after all the Structured (or Standard) Query > > Language. > > Sure, but not everybody sees it as a *programming* language. One would not > typically pick SQL as the obvious candidate language in which to write, > say, a video game. "not everybody" seems a poor arguement. Lots of special purpose languages are used by small numbers of people. SQL is a SPECIAL purpose PROGRAMMING language. No one claimed it was a GENERAL purpose programming language. There are special purpose languages for game development which i would not pick as a candidate language for processing payroll. And I would not pick a game language or SQL to do computaional fluid dynamics. Pick the right tool for the job. Just because a tape measure isn't a saw or hammer doesn't mean it is not a tool. > > > Maybe its power obscures its usefulness. A simple SQL script > > can do a LOT of processing (stuff that would take a procedural language > > kilolines of code). I consider it a programming language. > > Okay. I think you're unusual in that regard. But unusual is okay too. One data conversion project I was on used lots of SQL scripts. The jobs run at each step were merely shell script wrappers to fire off the SQL. The SQL scripts did the real heavy lifting. The SQL might have been only one command (an INSERT with the data coming from a complex subquery) but was more powerful than trying the same thing in a general purpose language. That project had about 40-50 programmers, so I doubt I'm that unusual. > > > So on the topic, SQL I'd say does not support files. (gets back to the > > "what is a file?" question, doesn't it.) > > Er, files are things in which you store data. QED? :-) So you define files as any persistant mass storage? That's something the thread hasn't agreed on. I think the general understanding of files is an allocation of mass storage with a name. So I quess SQL tables match that description. ed .