On Mon, Jul 19, 2010 at 05:01:09PM -0400, Uri Guttman wrote:

> gack, this thread is annoying. so here are some high level philosophical
> questions to think about regarding languages.

Great questions all. This is partly why I hang out at the perl bar.

> first off, why are there so many languages? and by many, i mean
> thousands and more. how many of you have invented a language (even a
> mini-lang)?

There are many reasons why there are so many languages; fun, profit,
inventiveness, need, annoyance are all good reasons, I am sure.

The last language I implemented was a domain specific extension language,
with VB like syntax, for a new system I was building.
The parser needed to hook into the application to validate incoming code
and generate code in a different language. One of the reasons for writing a
new language is that none of the existing languages I reviewed had a friendly
enough syntax for non-programmers and and didn't have the level of validation
the users needed. Writing a computer language for non-programmers is very
hard. 

I have also implemented a lisp system in perl. Which was a really fun project.
Can't say it made me a better perl programmer, but definitely improved my lisp!

> no one seems to have mentioned turing compatibility. this means
> something deep in all the langs mentioned. discuss.

No one mentions it because most languages that most people know are,
and people implicitly assume their languages are Turing complete and
equivalent even if they don't know about it. For most people, syntax
is a more important criteria than power.

> what about all those langs that were meant to conquer computing
> civilization? PL/I, COBOL, ALGOL and even the dreaded ADA. c actually
> conquered more than all of them. do you consider c a high level
> language?

Any claim that a language will conquer computing civilization is mere
marketing. For better or worse, marketing is frequently effective.
I'm old enough now to remember, Windows, 4GL languages, relational databases,
C++,  Java and the Internet all touted (rarely by technical people) as
the most exciting thing ever. Obviously we know better.

> should you learn assembler? is there work in it (yes)? what would
> assembler teach you when using a high level lang?

Absolutely! I thoroughly enjoyed learning assembler. Though I no longer
program in it, I still look at the assembler my compilers generate.
Ultimately, your code has to be executed by the machine. It helps to
know how it does it so you can write tasteful code.

It amazes me when I see a piece of code that is inefficient,
wasteful of resources or just slow because the author did not understand
what really happens to their code. This is especially true of so called
scripting languages. For some reason, some scripting language programmers
seem to thing it's ok to write poor quality code, perhaps on the hope that
the interpreter will magically improve it.
I firmly believe that every programmer should understand what their
compiler or interpreter does with their code. Even just reading the code is a 
good first step.


> what does it mean when you like or dislike a lang? in a non-technical
> way why did you make that decision?

Languages exist in a social environment that extends beyond programmers and are
rarely considered solely on technical merit. I suspect that most
programmers 'choose' their languages because of a job, popularity or the
similar factors and a relatively few choose them based on technical merit.
I've been relatively lucky enough to have the freedom to choose the languages I 
know.
I learned Perl because it helped me to generate code for other languages:
about 14 years ago I was writing a program in VB and got tired of the boiler
plate and decided to write a meta-program in Perl to generate the VB code.
Later, while working on a C based virtual machine, I used Perl to generate the 
ops tables
and parts of the grammar file. Trivial stuff now, but a big deal for me back 
then
and the beginning of the realization that some languages are better at some 
things
than others and that it's better to know a lot of languages than just one.

Today, I don't even 'think' in any specific language.
Occasionally, I find myself typing syntactic constructs that don't exist
or don't exist in the particular language I'm working in. It's either a
'senior' moment or time to write that DWIM meta-language.

Of course, I have my non-technical preferences, like everyone else:
I don't like languages that are too verbose, don't have features I consider to 
be
useful/necessary, or force me to jump through hoops even for simple programs.
Yes, it's all a matter of taste and I make exceptions for my favorite
languages.

I like Lisp but still compile snippets of C into assembler
to see what the compiler is doing.

> have any of you ever read an ANSI standard for a language? or tried to
> implement parts of a standard like that? hell, reading ANSI standards is
> a major skill in its own right!

I've read the standard for Lisp and the draft standards for C.
When it comes to languages, I tend to read the grammars, specs, and code
where they are available.

> are languages for people or computers?

Both. People have to understand the language well enough to write, read, and
maintain programs, but the machine runs it. One has to find the right level
of expression to achieve both goals effectively. In the, infrequent, case of a
conflict I invariably choose people over the machine: sometimes you have to
give up a few cycles to write code other people will grok easily.

All these questions are ultimately about what it means to be a programmer.
The tools we use help to shape what and how we think.
As a friend recently reminded me, programmers are no different from
doctors and lawyers: there are good ones, there are bad ones and there are
those for whom it's just a living. We each get to decide what kind of
programmer we want to be.

-Gyepi

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to