TinWhisker
Posts: 4
Joined: Wed Nov 09, 2011 10:38 am

Re: Pros and Cons of programming language X

Sat Nov 12, 2011 10:04 pm

I do like BASIC, still widespread and able to do pretty much anything 'better' languages can do.

But... Given most popular languages today are of the bracketed variety, it's probably better to pickup something that progression is in a familiar environment.

Personally, jumping between, say VB/ASP (.Net or otherwise) over to C#/C++/PHP - I'm always missing brackets or over-complicating the latter types, good for variety, bad for time/continuity/mindset.

Hopefully, the Mono framework is workable, so I can flit between VB/C# while I get up to scratch on better languages.
That Google Go looks interesting - will look that up.

Nobody
Posts: 16
Joined: Tue Nov 01, 2011 8:07 pm

Re: Pros and Cons of programming language X

Sat Nov 12, 2011 10:45 pm

Okay this is going to be off topic, sorry about that.

Quote from AlanCox on November 10, 2011, 20:14
Pascal died years ago and its out of date on concepts around exceptions, garbage collection, object orientation, structure and a lot more little details of the modern world.
I don't think so. On the contrary, it's more able than ever. Besides, how would you define a language "dead" anyway?
Pascal has exception, so what is outdated about them?
Garbage collection: usually unnecessary if you write clean code. (of course I once wrote a program which quickly ran out of memory, however, that was easily fixed)
Object orientation works pretty much the same way as in other languages (C++ or Java).
In other words I don't understand your critique at all.

It also fails the critical "can do something useful" test. Teach a kid Java or javascript and he or she (sadly 90% he) will be gleefully producing applets that do stuff, bouncing web pages and other internet horrors. Teach them Pascal and they has no way to explore.
Depends on how you define your "can do something useful test". Personally I can't think of any simple Java example that can't be done in Pascal - often in a simpler/faster way. too.
Of course a Pascal-program doesn't run inside a browser, like JavaScript. However, in my opinion, that is a good thing.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Pros and Cons of programming language X

Sun Nov 13, 2011 6:53 pm

Well as I said in the OP, let's not start debating each others lists :P Everyone will have opinions on what is a pro or con of a language. Indeed one person's pro might very be another person's con. But I want people's input so do you have your own pro/con list for a programming language?
Dear forum: Play nice ;-)

Timo
Posts: 8
Joined: Sat Aug 27, 2011 9:04 am

Re: Pros and Cons of programming language X

Sun Nov 13, 2011 8:23 pm

C++ in three sections: pro, pro/cons, cons, because some features are pros/cons at the same time.

Pros:
- Fast
- Widespread
- If you can C++, Java won't be a problem
- (nearly) downwards compatible to C
- OO (but can be avoided)
- Available on all platforms
- Templates (and template-metaprogramming)
- C++11 supports some features from functional languages (like lambdas)

Pros/Cons:
- No garbage collection
- Close to hardware

Cons:
- Small standard library (with boost-library installed it's ok, otherwise third-party libraries necessary)
- Seems to be hard to learn (in my opinion teaching often includes many details and subtleness before necessary)
- Historically inherited burden

Hello World:

#include <iostream>
using namespace std;

int main () {
cout << "Hello, World!" << endl;
return 0;
}

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Pros and Cons of programming language X

Mon Nov 14, 2011 2:57 pm

If the objective is to teach first timers some programming then you can’t go far wrong with Logo / Turtle! Start them off with simple lines and shapes, introduce them to functions and recursion and get them to do more complex patterns and shapes. Maybe even fractals eventually.

Pros;
It’s visual, kids will likely go for it.
It’s been taught in schools for years, so there should be plenty of pre-cooked lesson plans around.
The concept of an algorithm can easily be demonstrated visually.

Cons;
You can’t do anything beyond drawing pretty pictures.
There are not many good versions currently being maintained, there are many dead abandonware versions.

I would say a hello world example in Logo would be a square… so;
REPEAT 4 [FD 100 LEFT 90]

User avatar
jwdietrich
Posts: 13
Joined: Wed Nov 30, 2011 11:52 am
Contact: Website

Re: Pros and Cons of programming language X

Sun Mar 25, 2012 7:35 pm

Nobody said:




if you use the windowed IDE (Lazarus), programs tend to get quite big with the default settings.



Yes, but after stripping debugging code the application get much smaller.

Andre_P
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 8:16 am

I think one of the advantages of the RPi is that you have the choice of learning a different language. You can settle into one you feel 'works' for you.

Sadly I have no pedagogalogical training so don't necessarily know what the best way to incolcate the ideas of programming into a young mind, I just learnt with what is available.

I would posit as long as the 'word' is carried it doesn't matter what the word is written in .

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 8:44 am

I am really trying very hard to sit on the fence on this one (despite touting gambas2 a few weeks ago) and it is this thought that concerns me

"the IT world runs mostly on C derived languages (java, javascript, c#, c etc)"

whoever makes "the decision" for the prime market (education) will undoubtably include that factor when drawing up an Options Comparison Report supporting "the decision"

In fact on these many threads on "Language A is perfect for Usage B" we (as an exercise) should stop, and take a step back and define a Set of Requirements and Assumptions behind them (this is not IT rocket science chaps) and ONLY THEN when we get some kind of consensus on requirements, look at all the options (from Arm Assembler to ADA and everything inbetween ) and rank them accordingly against those requirements - a reasoned and justifiable answer will fall out of the wash.  In fact if the RPF haven't already done this, I would be massively surprised - can anyone confirm?
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 1:15 pm

Just a reminder that the topic of this thread is to give an objective pro/con list of your programming language of choice.  It's not necessarily about which language is best, it's about what you think of a given language (one's person pro might be another person's con) in order to help new comers to programming pick a language to start with.
Dear forum: Play nice ;-)

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 2:23 pm

So why don't we start from all the things that we believe are important to make a 'good programming language'?

My starters would be:

1. Clean consistent syntax

2. Extensibility

3. Relevant going forwards (rules out ALGOL )

4. Instant gratification - i.e. interpreted or very-fast-compile-and-run

5. Good collection of 'examples' to be downloaded and learned from

Abishur, do NOT put the cart before the horse, it'll all go wrong
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 2:35 pm

SN said:


So why don't we start from all the things that we believe are important to make a 'good programming language'?

My starters would be:

1. Clean consistent syntax

2. Extensibility

3. Relevant going forwards (rules out ALGOL )

4. Instant gratification - i.e. interpreted or very-fast-compile-and-run

5. Good collection of 'examples' to be downloaded and learned from

Abishur, do NOT put the cart before the horse, it'll all go wrong


While I certainly appreciate your stand point here, it's not the point of this thread.  If you want to discuss these very valid points than make a thread to do so.  It's not a matter of cart before horse, it's a matter of the scope of the topic I started this thread to discuss   Please keep this thread on topic
Dear forum: Play nice ;-)

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Pros and Cons of programming language X

Mon Mar 26, 2012 3:22 pm

I'll add something to it from a slightly different prespective... Not from the generic "Hello World" program, but how to actually get that program typed in and running in the first place.

The beauty of those early micros in 1970's and 80's (for me) was their instantability (not a word, but hey).. Before that (and actually when I went to uny in the early 80's) there was punched card, coding forms, (and rooms full of girls typing in your program), batch processing and so on. Things started to change and interactive computing gained pace - the line editor, screen editor and so on. But still BASIC was instant. To run a Pascal, C, FORTRAN, COBOL, etc. program required an editor, knowledge of the computer system - what commands to run it, compile it (or in my unys case how to submit it to the batch processor), etc.

Even today we need an editor or an IDE to write a simple program and it sort of dissapoints me to see some IDEs with the debugger already there and running. Or we use an editor, Emacs, Vi, pick your holy editor war, then the magic runes to compile and or run the program.

PHP has an interactive mode - does Python? (I'm not a Python programmer, so just don't know, but I imagine it's going to be hard to keep track of indentations ,etc. in an interacive manner)

So maybe we shouldn't be thinking of the language, but more thinking of the environement - and the entry level of that environment to the newbie computer user - as I'm sure they'll be very dissapointed after leaving their shiny iDroidToys to have to type on a computer keyboard!

That's where BASIC scored IMO - it was instant, the editor was, well basic but functional and the entry level low. I'm also sure that if people are really keen then it really won't matter what language they start on - they'll soon have a hankering for learning more and those that don't have any enthusiasm for programming are weeded out early on and left to learn cooking or some other useful skill... I went from BASIC to FORTRAN, then to something called IMP-77 which is an Algol derivative, but one that gave me a good intro to structrured programming. Pascal and C were trivial to pickup after that. (However I'm also a good cook, so something went wrong somewhere!)

I did notice that todays equivalent of people typing something like this:

10 PRINT "Gordon is COOL"

20 GOTO 10

into a shop computer/laptop/tablet on display seems to have been replaced by kids using them to bring up somewhat "intersting" web sites... My how we've progressed!

I still like BASIC - to the extent that I recently wrote my own interpreter just for fun. It was nice to think what I could add into it to make it a bit more "modern" and not just another 8-bit BASIC clone. I'm actually having a lot of fun just playing with it now too, although my 2-line PRINT/GOTO program is now 3 lines:

10 CYCLE

20    PRINT "Gordon is COOL"

30 REPEAT

which seems like a step backwards... Ho hum!

Gordon
--
Gordons projects: https://projects.drogon.net/

pluggster
Posts: 41
Joined: Mon Dec 05, 2011 10:37 pm

Re: Pros and Cons of programming language X

Tue Mar 27, 2012 11:46 am

c++

con:

header files!

User avatar
glenn66
Posts: 55
Joined: Fri Nov 25, 2011 4:06 pm
Location: Belfast
Contact: Website

Re: Pros and Cons of programming language X

Tue Mar 27, 2012 2:46 pm

LISP

Pros - Can't think of any.  It was very recursive.

Cons - (see above)

User avatar
glenn66
Posts: 55
Joined: Fri Nov 25, 2011 4:06 pm
Location: Belfast
Contact: Website

Re: Pros and Cons of programming language X

Tue Mar 27, 2012 2:50 pm

SN said:


I am really trying very hard to sit on the fence on this one (despite touting gambas2 a few weeks ago) and it is this thought that concerns me


I have to agree on Gambas2, I am a huge fan and I still contend that Gambas has more chance of being widely used in schools than anything else simply because most IT/ICT teachers are used to VB.net and need a gentle learning curve.

To be honest, I can't understand why so many people seem to have a downer on Gambas, but there you go.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Pros and Cons of programming language X

Tue Mar 27, 2012 2:59 pm

Glenn said:


SN said:


I am really trying very hard to sit on the fence on this one (despite touting gambas2 a few weeks ago) and it is this thought that concerns me


I have to agree on Gambas2, I am a huge fan and I still contend that Gambas has more chance of being widely used in schools than anything else simply because most IT/ICT teachers are used to VB.net and need a gentle learning curve.

To be honest, I can't understand why so many people seem to have a downer on Gambas, but there you go.



I'd never heard of Gambas until I read it here and I've been programming professionally for over 30 years now... Having a quick look at it on wikipedia, I see many windows, file viewer, debugger, odd icons and who knows what else... Too much IMO for a very first-time user. The beauty of the old systems was that you just switched them on and it was there. No fussing, no launching anything, just turn in on (and in some cases insert the disk) and off you go...

(I'm also skeptical of your comment about most ICT teachers knowing VB.net, or even programming at all, but that's another matter!)
--
Gordons projects: https://projects.drogon.net/

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Pros and Cons of programming language X

Tue Mar 27, 2012 3:05 pm

There seem to be two distinct flavours of Gambas

Gambas2 is a near Visual Basic 5 / 6 clone - which is where my professional programming life came to an end - I have kept a VB6 installation on my Works Laptop ever since and have written the odd tool over the last 6 or 7 years for when Excel/awk wouldn't hack it, so I still "have my hand in" so to speak.

Gambas3 is, I think, a VB.Net clone - I installed this one first and got somewhat lost before remembering my brief flirtation with VB.Net and C#

But I do have some sympathy with the need for a "switch it on and go" approach being touted and neither Gambas2 or 3 is going to meet that need
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Pros and Cons of programming language X

Wed Mar 28, 2012 7:22 am

Glenn said:


LISP

Pros - Can't think of any.  It was very recursive.

Cons - (see above)


No, no, no, no, no.  As a non lisp programmer, you managed to miss an opportunity to use what's probably the best (and, true to lisp form, most concise) programming language joke out there.  I'll leave you to work out what it is.

Lisp is actually one of the best languages to learn programming, full stop. It's efficient, and totally multi-paradigm.  It's also very easy to understand from first principles - it's based on one underlying representation that is shared by data and code, and a minimal implementation needs a total of (IIRC) 7 primitives, although it's easier with 10 or so.

Lisp is beautiful.  It's simplicity, purity, expressed in code.

Yes, lisp stands for "lots of insane, stupid, parentheses", but the syntax is irrelevant (and anyway, you generally use less parens in lisp than you do in the equivalent C++, it's just that C++ uses loads of different types of parens in all sorts of strange way)

Recursion is not an issue.

The actual downsides of lisp are largely to do with implementations of Common Lisp, which are massively complex and overengineered.  Common Lisp includes not only the kitchen sink, but also 27 other possible implementations of a sink that might be used in a room designated for cooking purposes.  And the specialist tools required to maintain them.  Plus an oven for curing the clay (also included) required should you want to make your own sink.  etc.

There's very good reasons why lisp and other functional languages are at the forefront of programming language research.  52 years after its creation, it's still totaly relevant, and still influencing programming language design.

Philip Greenspun said:


Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.


Return to “Off topic discussion”