D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Simple programming language

 

On 16 Nov 2013, at 20:31, Simon Avery <digdilem@xxxxxxxxx> wrote:
> 
> Seriously - precision is a requirement of any programming language. Perl's errors 
> and syntax are absolutely fine. I can write ugly, incomprehensible perl - and I 
> can also write elegant and easily understood perl. I imagine most coders can do 
> the same in whatever language they prefer.

The kinds of issues I see with Perl would be:

Poor location reference in errors. Very easy the generate an error referencing line 
200 when you edited line 180. For programmers this is usually not an issue, because 
you know if you messed with braces or semicolons, but it is painful when learning.

Idiosyncratic support for data structures and objects and even subroutines. Okay 
scalar, array, hash and reference are fine as far as they go, but to do anything 
useful you end up messing with referencing and dereferencing. I hate this when I'm 
writing small snippets of Perl. The more than one way to do it doesn't need to apply 
to basic operations on data structures, so example code may use varying syntax for 
the same data references, making it three times as hard to learn as it need be, 
assuming you need to teach referencing and dereferencing explicitly at all.

Flexible syntax - a lot of typos result in valid code (warning/strict helps here).

Don't get me wrong, I've used Perl a lot, I know you can write clean code in most 
languages (well maybe not brainfuck) but the is learning, the mistakes have to fit. 
Java is the only language I've been paid to code in where errors and mistakes always 
seemed logically related to what I'd changed. Although some other languages I played 
with or done incidental bits in also seemed far better than average (Python).

There is a huge difference between what is effective learning, and effective 
programming, which is why we were taught Pascal first at Uni, although it did then 
make some if the programming languages I used after look a little primitives (being 
a maths student Fortran 77 was next).

There are reasons why a lot of Uni's use to teach Java initially, although it might 
be painful for younger kids.

We also did a simplified assembler like language at secondary school, which had some 
merit in teaching how machines actually worked. Although now processors have 
instructions like AES-NI set it might not well reflect reality. May be some merit in 
teaching the older style  assembly languages since it allows one to picture things 
before you factor in all the fancy CPU stuff that muddies the picture.




-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq