to RG - Lisp lunacy and Perl psychosis

T

Tamas K Papp

You still haven't read my post, or if you did you haven't comprehended
it. There's nothing in it that works against peace and happiness. I

I have read your post and understood it, but I am not really
interested in getting into meta-discussions.
That's right. There isn't anything horrible or abominable in either of
the two languages. It certainly wasn't my intention to create that
impression, just to opposite in fact.

So when you said "ignoring the horribleness and the abominable in
another language because you do understand it", what another language
were you referring to? Perl, CL, or something else?
Somehow, you think that I've said exactly the opposite of what I meant.
Either I wasn't clear in my writing, or you weren't clear in your
reading. I'll try one more time.

<emphasis>Calling a language horrible because you don't understand it is
a mindless prejudice.</emphasis>
A
Do you understand that? I contrasted a bit of working Perl code (which
appears to be abominable) to a deliberately obfuscated bit of Lisp code
to make that point. I really don't understand why you think I have
insulted CL, when I undertook to say that insult based on ignorance is
pointless.

When you made a statement about "ignoring the horribleness and the
abominable in another language", I thought you meant Common Lisp. Did
you mean Perl?

Tamas
 
R

Ron Garret

ccc31807 said:
Was that because Perl was a bad match for the project? Or because the
developers were incompetent in Perl?

Why must those be the only possibilities? It was because the Perl code,
which had been working fine for months, suddenly started failing
silently and intermittently, and I was told there was no way to do the
equivalent of wrapping the whole script in the equivalent of a
TRY...EXCEPT form in order to catch the error. Whether this was in fact
true or whether the entire engineering team was incompetent I do not
know. But they seemed pretty bright and capable otherwise, so it would
be pretty odd for them all to be mistaken about this.

rg
 
R

Ron Garret

Tad McClellan said:
["Followup-To:" header set to comp.lang.perl.misc.]

Ron Garret said:
What does that have to do with what I asked?


Nothing, but it does go a long way in supporting your point
about punctuation being hard to read correctly. :)

Exactly.

rg
 
R

Ron Garret

Yes, that is exactly the problem. Perl is not content with assigning
semantics meaning to every single symbol on the keyboard, it *overloads*
those symbols, so even if you *could* look them up you *still* wouldn't
know what they meant without first deciphering the context.

You mean like lead and lead in English? Or + and + in C which, gasp, can
be used for char, short, byte, int, long, float, pointers, and a myriad
of others?[/QUOTE]

Yes. Exactly.
Because you were looking at a function who's first argument is a regular
expression

And how am I supposed to know that if I don't know Perl?
True, for you it would be a major drawback because you couldn't rant
about it any longer.

Yeah. That would really suck. What would I do for fun?
[...]
Why would I want to distinguish between types at all?

So are you suggesting that e.g. C's distinction between short, byte,
char, int, long, unsigned, double, ultra-special-extra-big .... would be
even better?

No. Of course not. Don't be ridiculous.
Typing is an aid to the programmer to avoid errors by inadvertently
using incompatible data types.

Typing *would* be an aid to the programmer if Perl actually prevented
you from using incompatible types. But it doesn't, e.g.:

print "a" + "b";

Defensible results include producing an error or outputting "ab". But
not outputting 0, which is what it actually does.

And while I'm at it:

%x=123;
print %x;

Shouldn't that be an error? It isn't. It prints 123. So does this:

@x=123;
print @x;

This is actually legal perl program:

print $(,$);

There are dozens and dozens of these obscure punctuational shortcuts:
$], $@, %!, $:, $^, %-, $^P, @F, @_, it goes on and on.

I'm sorry, but this makes my skin crawl.

rg
 
C

ccc31807

So when you said "ignoring the horribleness and the abominable in
another language because you do understand it", what another language
were you referring to?  Perl, CL, or something else?

I used the same words that RG used, which were, and I quote: "Perl is
just an ... abomination through-and-through. ... It was just
horrible." I wasn't referring to any particular language, but to the
descriptive lwords used. You might make a credible case that a
particular language is horrible, and support your argument with logic
and specific examples, but RG did not seem to do so. Instead, he
seemed to be making his argument from simple prejudice and ignorance.
I was pretty specific in stating that you can't judge a language
without knowing something of the substance of the language, and quite
frankly, I'm at a loss to see how you missed the main point.
When you made a statement about "ignoring the horribleness and the
abominable in another language", I thought you meant Common Lisp.  Did
you mean Perl?

I didn't mean ANY particular language -- I meant the process of
characterizing a language the way RG did based on reading a few
chapters of an anonymous book. In the same way, I took it as fact that
someone who expresses prejudice AGAINST something would also express
prejudice TOWARD something else based on familiarity.

Over the years, I've had some interaction with students and graduates
of business and management departments of colleges and universities.
These departments have IS or MIS majors and programs, and they
typically use Microsoft technologies, such as Windows and Visual
Basic. As a result of their indoctrination, they sometimes believe
that Visual Basic is the highest and best programming language, and
that all other languages are inferior. I have had one experience (not
personal, but vicarious) of a manager taking over a unit of a large
financial services firm and decreeing that from thenceforth all new
development would use Windows, and MS tools, and that all existing
processes would be converted. This notwithstanding the fact that the
cost per transaction of the existing processes (Unix based) was about
twenty percent of the cost of the existing MS units and that the
conversion would entail substantial costs.

WRT Perl, I agree that it's an ugly, convoluted, write once read never
language, but it's popular, and it's popular for a reason. It's
popular despite the fact that it's not taught in school, or in
extension classes, or is on anyone's official list of approved
technologies. Personally, I can tell you that it's a very good match
for my job, better than any language I've had personal experience with
(and I've studied and or learned about a dozen languages in my
career.) I'm also making an effort to learn CL and achieve some
proficiency in CL. My feeling so far is that CL is a more powerful
language than Perl but not as suited to my job.

Here's the point: Don't disparage a language before you know it, and
don't rely on ignorant bias to disparage a language.

CC.
 
R

Ron Garret

ccc31807 said:
WRT Perl, I agree that it's an ugly, convoluted, write once read never
language, but it's popular, and it's popular for a reason.

Sarah Palin is popular too.

rg
 
T

Tamas K Papp

I didn't mean ANY particular language -- I meant the process of
characterizing a language the way RG did based on reading a few chapters
of an anonymous book. In the same way, I took it as fact that someone

That doesn't make sense. If somebody judges a language based on
insufficient information, they will be ignoring horribleness and
abominations in another one? Do I need some kind of hallucinogen to
understand this reasoning?
Here's the point: Don't disparage a language before you know it, and
don't rely on ignorant bias to disparage a language.

A truly deep point. I guess people didn't know this before.

I humbly offer the following pieces of advice, equally profound and
relevant to these newsgroups (but slightly more general):

It never rains but it pours.
A watched pot never boils.

Regards,

Tamas
 
T

Tim X

Tamas K Papp said:
On Wed, 10 Mar 2010 07:01:14 -0800, ccc31807 wrote:


Your post actually highlights some similarities between Perl and CL:

I thought that was part of his point. i.e. the differences are largely
just differences of syntactic sugar and that criticising one for being
'horrible' when you don't understand its type of refined sugar while
ignoring aspects of the sugar you are familiar with that could be just
as easily abused or confusing to the uninitiated was illlogical and
meaningless.
both have various namespaces, once you see through the thin layer of
syntax for accessing these. So your feeble attempt at starting a
flamewar is pretty... funny.
Flamewar? I thought it was a reasonably thought out and argued response.
Unlike RG's original comments on perl, the gist I got from the post was
in fact anti-flamewar i.e. that the differences were really about
differences in familiarity and that claiming one is better than the
other is pretty pointless. If anything, it was the more rational and
balanced assessment compared to RG's original comment.

For the record, I find a lot about perl I don't like, especially with
respect to its syntax and somewhat inconsistent behavior in certain
areas. I much prefer CLs simpler and far more consistent approach. I
disagree with Perl's philosophy of allowing everyone to do it 'their
way' and anyone who has worked with perl on either a project with many
develoers or maintaining code written by many different authors will
know what I'm getting at. However, I've also frequently come across
problems that are much easier to solve with perl than they are with CL.

In fact, I ran into one just recently. I had to do some work with a
system that makes extensive use of Oracle and Oracle stored procedures.
I wanted to use CL for the task. However, after many many hours of
searching and trying out various CL interfaces to Oracle, I had to give
up because I could not find one single CL to Oracle library that would
allow you to work with stored procedures and ref cursors. Plenty, like clsql and Clisps
Oracle DB extension would allow you to do basic SQL queries, but none
would allow you to call a stored procedure and have access to all Oracle
parameter type (IN, OUT and IN OUT) or ref cursors (at least I couldn't
work it out from the docs or source code or experimentation).

After many many days of installing various libs, which in itself was
often painful, going through lots of docs, many of which were outdated,
incomplete or poorly written and even having compiled clisp extensions
etc, I had to give up.

I turned to perl. In less than half a day, I had things working via
Perl's DBI interface using the DBD::Oracle driver. Installation was
rediculously simple - essentially starting the perl CPAN shell and
asking it to install DBI and DBD::Oracle and it came with extensive and
well written comprehensive documentation. In half a day I had all the
tools working ans was able to concentrate on the problem I wanted to
work on rather than tyring to just get an environment that would let me
even start.

I'd prefer to be working with CL, but taht wasn't possible. Arguements
regarding which language is better or more powerful at a theoretical
level become pointless if you cannot use it to solve a real world
problem. This type of issue gets raised in this group frequently and the
general response is to attack the poster and become extremely defensive,
making all sorts of wild claims about CLs power and the ease at which
you can implement a library etc. However, the reality is that for many
problems, CL is not a good choice because it lacks the user base of
other languages such as perl and therefore lacks the extensive
repository of working useful libs that give the productive edge you need
to survive in the commercial world.

If, on the other hand, I want to experiment with some ideas or write
some software for pleasure or do something where I have the luxury of
time etc, I will likely use CL because it is one of the languages I
really enjoy programming in and which frustrates me less. It is
frequently the language I'll turn to if I want to try out something
unusual or a bit left of field where I don't want the preconceptions of
Larry, Gido or Matz getting in my way. However, if I want to get paid
for solving a problem and want to get a reasonable hourly rate, I'm
afraid CL will seldom be my first choice because I cannot rely on basic
library functionality being available and I don't ahve time to write
everyhting from scratch.

We probably need tobe a little less sensitive regarding criticisms of
CL. Sometimes, they are valid and we should listen and learn.

Tim

P.S. If anyone knows of a CL library that will allow me to interact with
an Oracle database AND allow me to call stored procedures, passing data
in both directions and access ref cursors, *PLEASE* let me know - I
would still prefer to use CL for these jobs over perl.
 
A

Alessio Stalla

P.S. If anyone knows of a CL library that will allow me to interact with
an Oracle database AND allow me to call stored procedures, passing data
in both directions and access ref cursors, *PLEASE* let me know - I
would still prefer to use CL for these jobs over perl.

If it's a viable option for you, you could use ABCL on the JVM and use
Oracle's JDBC driver.

Alessio
 
T

Tim X

Alessio Stalla said:
If it's a viable option for you, you could use ABCL on the JVM and use
Oracle's JDBC driver.

Yes, I was thinking about that as a possible option. Don't know anything
about ABCL and was hoping to stick with a familiar ANSI implementation
such as SBCL or even CLISP. Don't know anything about the
interface/mapping between ABCL and java libs and wsn't sure if I was
going that route whether I would be better off just jumping into clojure
as I've been thinking about finding some project to try it out.

Is there much that would take getting accustomed to in ABCL that may
feel 'foreign' and how ANSI compliant is it?

thanks,

Tim


thanks for the suggestion

Tim
 
C

ccc31807

No. No No No. *Your* Perl may be, but don't tarnish the rest of us with
the same brush. It's perfectly possible to write readable Perl; indeed,
IMHO, it's wasier to write readable Perl (with a little effort) than
most other languages.

Ben, I like Perl a lot, and I've developed enough proficiency in Perl
to do useful work and earn a living with it. I said this with my
tongue partly in my cheek, and without meaning to give reasons for
avoiding it. People can consider Perl ugly with all the punctuation
characters, just as Larry Wall can consider Lisp ugly with all the
parens (his remark about Lisp looking like oatmeal with finger nail
clippings.)

The OO and reference hacks are also convoluted, with arrays and hashes
only holding scalar values. This caused the convoluted assignment
statements which you objected to, i.e., $hash{$anotherhash{$k}{'key}}
('realkey'}. If you keep your data structures in mind, it's easy to
write these references without thinking, but hard to read them when
the data structures are out of mind.

In the thread on c.l.l. ("another frustrating learner question, CLOS")
I wrote a fairly extended defense of REs, which was the original point
of RG's complaint about Perl. REs are also ugly, convoluted, and write
once read never bits of code, but they can also be beautiful, elegant,
and perfectly lucid bits of code as well, and at the same time, too.

This is one of the mysteries of life which we might as well accept, as
we can do nothing to change it.

CC.
 
A

Alessio Stalla

Yes, I was thinking about that as a possible option. Don't know anything
about ABCL and was hoping to stick with a familiar ANSI implementation
such as SBCL or even CLISP. Don't know anything about the
interface/mapping between ABCL and java libs and wsn't sure if I was
going that route whether I would be better off just jumping into clojure
as I've been thinking about finding some project to try it out.

The Java access API is derived from ACL's jlinker (http://
www.franz.com/support/documentation/current/doc/jlinker.htm). The
notable differences are:

- ACL's API assumes the JVM is a different process, while ABCL runs in-
process, so it lacks all the functions for managing the connection
with the JVM; and

- ABCL's API has the option to be a bit less verbose, letting ABCL
choose automatically the method to call from the argument types, at
the cost of a runtime performance hit. For example: (jcall (jmethod
"java.lang.Comparable" "compareTo" "java.lang.Object") instance obj)
vs (jcall "compareTo" instance obj). There's also the JSS library
maintained by Alan Ruttenberg which is even less verbose, has more
features and is more efficient (wrt ABCL's abbreviated API).
Is there much that would take getting accustomed to in ABCL that may
feel 'foreign' and how ANSI compliant is it?

It is mostly ANSI compliant; it lacks the long form of define-method-
combination and fails 30-something tests from the GCL ANSI test suite
(IIRC 21k+ tests).
Compared to other, more mature implementations with a larger user
base, it lacks a number of things that are usually taken for granted;
for example, the MOP is incomplete, the debugger could be improved in
many ways (e.g. it doesn't show local variable information), the
compiler doesn't use type information very much, etc.
Oh, and it's the only CL implementation I know of where = fixnums are
not always EQ, due to boxing imposed by the JVM.

hth,
Alessio
 
M

Martijn Lievaart

Why must those be the only possibilities? It was because the Perl code,
which had been working fine for months, suddenly started failing
silently and intermittently, and I was told there was no way to do the
equivalent of wrapping the whole script in the equivalent of a
TRY...EXCEPT form in order to catch the error. Whether this was in fact
true or whether the entire engineering team was incompetent I do not
know. But they seemed pretty bright and capable otherwise, so it would
be pretty odd for them all to be mistaken about this.

If they didn't know about eval { original code here };, they were
incompetent. But there were probably other factors at work you didn't
tell about.

M4
 
P

Peter J. Holzer

Most of what I have to say about this has already been said by other
people, but since this post is addressed specifically to me I'll respond
nonetheless.
[long fullquote deleted - please quote only the parts necessary for
context]
Certainly my opinion is only my opinion. But in my opinion it is not
true that "one language isn't better or worse than the other."
Brainf*ck, Whitespace, and Unlambda, for example, were specifically
designed to be bad languages, and they are.
Agreed.

Perl was not specifically designed to be a bad language, but it is
(IMHO of course) for many of the same reasons that the aforementioned
languages are bad.

I don't think so. It doesn't meet your aesthetic criteria, but it is a
powerful programming language which can be used to write everything from
simple throwaway scripts to large, complex software systems, in a
readable, testable, maintainable way.

It is true that the syntax is rather complex - probably one of the most
complex ones in popular programming languages. This is intentional:
Firstly, because Larry tried to throw all the good bits from lots of
programming languages in (when I first encountered Perl I called it
"the PL/1 of nineties"), and partly because he modelled it after natural
languages, so like natural languages it has a complex, irregular,
context-sensitive syntax with lots of shortcuts. He probably went too
far - Perl syntax could be cleaner and less visually cluttered without
losing expressivity.


Lisp is the opposite - it has an extremely minimalistic syntax, and for my
taste it goes too far in the direction of simplicity and purity. A lisp
program may be easy to read for a lisp compiler, but it isn't easy to
read for me. I need more visual structure.

You write:


Maybe I don't qualify as a journeyman I can't follow that Perl code, and
for exactly the same reason that I can't follow Brainf*ck code: too much
punctuation. What does !~ mean? What do the curly braces denote? What
is /\d/? And if I don't know the answers, how do I look them up? (Yes,
I tried Perldoc. It didn't help.)

Well, all of these are described in perldoc, so I don't understand why
reading it didn't help.

The Lisp code, by contrast, has only three items of punctuation that I
have to understand: parentheses, double quotes, and the colon. All the
rest is English words. Some of those words might be mysterious (like
CONS) but at least I can plug those into a search engine to obtain
additional clues. And the double quotes mean exactly what they mean in
common usage, so that leaves only two punctuation marks to deal with.

That doesn't necessarily make the language easier to learn or read.
On the contrary, I think lisp offers too few visual clues - everything
looks the same to me. (but then I've never used lisp in anger, so in
part this is simply because I'm not used to it)

Also, others have mentioned this but it's worth reiterating: you've
taken actual working Perl code and compared it to a Lisp example
specifically designed to be pathological.

While Carter's code wasn't specifically designed to be pathological it
was pretty bad, too.

But how would the same code look in well-written Lisp? (Ben already
showed well-written Perl).

No, Perl uses sigils to indicate a variable's data type, not a token's
usage. Except that it doesn't.

Right. It doesn't do that but for a completely different reason:

The sigil has (almost) nothing to do with the variable's data type.
Instead it is an article, like in many European languages.

English is a bad example, because it has only one definite article
(the), so let's use Italian:

il - singular male
la - singular female
i - plural male
le - plural female

Gender doesn't have any meaning in Perl, but we can distinguish between
singular ($) and plural. And there are two types of plural - ordered
(lists, arrays: @) and unordered (hashes: %).

So $ denotes singular:

$ x - one x
$ a[2] - one element (with index 2) of the array a
$ h{'k'} - one element (with key 'k') of the hash h

@ denotes an ordered plural:

@ a - the whole array a
@ h{'a', 'c', 'b'} - the elements with keys 'a', 'c', 'b' of hash h, in
that order.

% denotes an unordered plural:

% h - the whole hash h

Note that I have used $ with a scalar variable, an array variable and a
hash variable and I have used @ with both an array variable and a hash
variable. So they clearly don't "indicate the type of the variable".

I have written a space after the sigil to emphasize that it is a "word"
in Perl's grammar and not a part of the variable name. Normally you omit
the space.

(Side note: Sigils are used differently in Perl6)
It distinguishes between scalars, lists, and hash tables,

Yes, but in a different way than you seem to think. Also, these three
are rather fundamentally different (although awk and JavaScript seem to
think that hashes and arrays are the same thing).
but not between integers, floats, and strings.

Right. It doesn't do that. Should it? From a performance POV maybe - a
4byte int takes a lot less memory than a perl scalar value. But from a
correctness POV using representative types doesn't buy you much - you
may represent both the area of your living room and the milage of your
car as a floating point number but that doesn't mean that the sum of
both makes any sense. For that you need a much more strict type model.
It distinguishes between strings and regular expressions,

No, not really. At least not any more than it distinguishes between
numbers and strings. And that distinction is relatively recent.
but not between strings and code.

Huh? Yes, it does. You can compile a string into code, but you'll have
to do that explicitely.
It has all kinds of weird punctuationy things that you can't look up,
like $@ and !~ and <>.

Of course you can look them up. All of them are documented and the Perl
docs aren't that bad (although I agree that they could be better). You
can't use google to search for them, but the same is true for any
keyword or variable name which happens to be a common English word
(although for opposite reasons).

It fails silently where it should produce errors.

That's debatable. Perl is in the C tradition of returning an error value
instead of throwing an exception, but that is only "silent" if the
Programmer carelessly ignores the return value.
It violates universally accepted conventions
about what, for example, double quotes mean. For example, this:

print "The widget costs $12.75.";

The actual behavior of that code snippet is not justifiable under any
sane language semantics.

"Universally accepted" is rather strong given that most shells, most
templating languages and many scripting languages use a similar
expansion mechanism.

The expansion mechanism in Perl has a few shortcomings, but the fact
that Perl has such a mechanism is a feature, not a bug. Apart from a few
pathological examples like the one above, simply embedding variables or
(very) simple expressions in a string is less cluttered and easier to
read then constructing the string with concatenation operators or
formatting functions. And Perl *does* have simple strings, you know.

hp
 
P

Peter J. Holzer

Why must those be the only possibilities? It was because the Perl code,
which had been working fine for months, suddenly started failing
silently and intermittently, and I was told there was no way to do the
equivalent of wrapping the whole script in the equivalent of a
TRY...EXCEPT form in order to catch the error. Whether this was in fact
true or whether the entire engineering team was incompetent I do not
know. But they seemed pretty bright and capable otherwise, so it would
be pretty odd for them all to be mistaken about this.

Well, they were wrong, but Perl doesn't throw exceptions silently. When
a Perl program dies, you get a message telling you exactly where and
why.

So when the program "failed silently and intermittently" there was
probably some error in the program logic which caused it to exit
prematurely. Wrapping the whole script in eval{} doesn't help here
because no exception is thrown. You'll have to analyze the logic flow of
the program to find that - I don't think that's any different in lisp
(yes, lisp is (or was) very popular in AI research, but automatically
finding logical errors in programs is still an unsolved problem, AFAIK).

Perl comes with a simple framework for unit tests. And because it comes
with Perl and is so simple to use, it is very common for Perl
programmers to write tests. There are also various ways to trace program
execution (from simple print statements to log4perl to smart comments to
running the whole thing in the debugger).

If your colleagues didn't use the tools they had and just said "it
doesn't work and we don't know why and can't find out" I'd call them
incompetent. But I don't know what they did, so I won't.

In any case I very much doubt that it is much easier to find the bug in
a lisp program which "suddenly started failing silently and
intermittently" than in a Perl program which does the same.

hp
 
P

Peter J. Holzer

That code is hard read, but it's not obfuscated. The variable 'names'
represent scalar values, in this case, an 'integer' used as a key. The
convoluation comes from Perl's awkward syntax for multi-level data
structures,

Now I'm curious: How is Perl's syntax for multi-level data structures
awkward? Which language does it in a less awkward way? I'd like to see
your code snippet translated into a "less awkward" language.

(I do find the dereferencing of array and hash refs awkward, but you
didn't use that here)

hp
 
P

Peter J. Holzer

Jürgen Exner said:
ccc31807 said:
That code is abominable and obfuscated, but of course you can write
abominable and obfuscated code in any programming language. [...]
$fac{$sec{$key}{'id1'}}{'location'}

Thank you for confirming my point.
This isn't harder than C pointers.

Saying something isn't harder than C pointers is like saying a desease
isn't worse than the Bubonic plague: it gives very little comfort to
people suffering from it.
Actually C pointers are probably among the worst concepts ever invented
in computer science.

They are not "invented" they are somewhat a 1:1 mapping to
assembly. I've never had problems with C pointers but that's most likely
also because I had programmed in Z80 assembly [1] (and some motorola
processors) for a few years before programming in C.

I started with BASIC (think early 1980's here - line numbers and goto),
then did a little bit of Pascal and assembly (6502 and Z80) before
learning C. Seeing the similarities between assembly and C has been a
real eye opener for me - suddenly I understood Pascal pointers (which
even more restrictive than Perl references).

I do agree, however, that it would've been nice if C had references like
Perl, and (harder to get to) pointers as they are now.

Actually, C pointers are quite ok in theory (for example, you can't make
a pointer into an array point outside of the array (except "just after"
it). The problem is that (almost) all C compilers omit the necessary
run-time checks for performance reasons and because of binary
compatibility constraints (you would need "fat pointers" to implement
them).

That, and a better standard library.

Yup. That one is very haphazard and seriously dated.

Disclaimer: haven't programmed in C for a while.

Me, too.

hp
 
P

Peter J. Holzer

Exactly. You can hardly do worse than that ;-)

But in all fairness, when C was developed in the early 70s it was a
major step forward and Kerningham and Ritchie could not possibly have
known as much as we do today.

That and they had to fit the compiler into 64k of memory. And it had to
finish in a reasonable time on a PDP-11. That somewhat limits what you
can do even if you know how to write a better language in theory.

(I do remember the MFII COBOL compiler on an 8086 - compiling our
program took half an hour)
For its time it was a great concept and
implementation. It's just that it is way outdated 40 years later.
Yup.



Or even Pascal or Modula or Haskell or pick pretty much any more modern
language.

Pascal is older than C. And its pointers are (were?) particularly useless.
Modula-2 was actually quite nice. One can see that Wirth used it to
write real code and not just for teaching :).

hp
 
J

John Bokma

Peter J. Holzer said:
[..]

I started with BASIC (think early 1980's here - line numbers and
goto),

ZX Spectrum, 1983 here
then did a little bit of Pascal and assembly (6502 and Z80) before

More or less same here, Z80, Comal, Pascal, 6800, 6809, 68000 ...
Actually, C pointers are quite ok in theory (for example, you can't make
a pointer into an array point outside of the array (except "just after"
it).

How does C prevent this? Or I don't understand what a pointer into an
array is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top