Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #6970 > unrolled thread

Perl or C++ better

Started by"Bill Cunningham" <nospam@nspam.invalid>
First post2016-10-15 17:24 -0400
Last post2016-10-17 22:50 +0200
Articles 6 — 2 participants

Back to article view | Back to comp.programming


Contents

  Perl or C++ better "Bill Cunningham" <nospam@nspam.invalid> - 2016-10-15 17:24 -0400
    Re: Perl or C++ better David Brown <david.brown@hesbynett.no> - 2016-10-17 11:20 +0200
      Re: Perl or C++ better "Bill Cunningham" <nospam@nspam.invalid> - 2016-10-17 11:17 -0400
        Re: Perl or C++ better David Brown <david.brown@hesbynett.no> - 2016-10-17 17:29 +0200
          Re: Perl or C++ better "Bill Cunningham" <nospam@nspam.invalid> - 2016-10-17 12:42 -0400
            Re: Perl or C++ better David Brown <david.brown@hesbynett.no> - 2016-10-17 22:50 +0200

#6970 — Perl or C++ better

From"Bill Cunningham" <nospam@nspam.invalid>
Date2016-10-15 17:24 -0400
SubjectPerl or C++ better
Message-ID<ntu6p5$uig$1@dont-email.me>
    I am used to programming in C. Now with linux. Could I get some opinions 
about Perl and C++? The pros and cons? This is opinion no one is right or 
wrong. I hear perl's easy and can be a shell language but so can bash. So 
Would Perl or Bash be a better script language. That's a better question.

Thanx

Bill

[toc] | [next] | [standalone]


#6971

FromDavid Brown <david.brown@hesbynett.no>
Date2016-10-17 11:20 +0200
Message-ID<nu254e$lsv$1@dont-email.me>
In reply to#6970
On 15/10/16 23:24, Bill Cunningham wrote:
>     I am used to programming in C. Now with linux. Could I get some opinions 
> about Perl and C++? The pros and cons? This is opinion no one is right or 
> wrong. I hear perl's easy and can be a shell language but so can bash. So 
> Would Perl or Bash be a better script language. That's a better question.
> 

It all depends on what you want to do - different programming languages
suit different tasks (and different people).

I would advise against C++ - I've seen your posts in comp.lang.c, and
know how you have struggled with just about everything in C.  C++ will
not be easier.

Try Python.  It will be simpler and clearer than C, C++ or Perl, and far
more flexible than Bash.  Since it is interactive and interpreted, it
can easily be used in a "trial and error" style that lets you see what
is happening (and what is going wrong).

[toc] | [prev] | [next] | [standalone]


#6973

From"Bill Cunningham" <nospam@nspam.invalid>
Date2016-10-17 11:17 -0400
Message-ID<nu2q1m$2np$1@dont-email.me>
In reply to#6971
"David Brown" <david.brown@hesbynett.no> wrote in message 
news:nu254e$lsv$1@dont-email.me...

...
> Try Python.  It will be simpler and clearer than C, C++ or Perl, and far
> more flexible than Bash.  Since it is interactive and interpreted, it
> can easily be used in a "trial and error" style that lets you see what
> is happening (and what is going wrong).

    Would it be good for scripts?

Bill

[toc] | [prev] | [next] | [standalone]


#6974

FromDavid Brown <david.brown@hesbynett.no>
Date2016-10-17 17:29 +0200
Message-ID<nu2qn9$4e8$2@dont-email.me>
In reply to#6973
On 17/10/16 17:17, Bill Cunningham wrote:
> "David Brown" <david.brown@hesbynett.no> wrote in message 
> news:nu254e$lsv$1@dont-email.me...
> 
> ...
>> Try Python.  It will be simpler and clearer than C, C++ or Perl, and far
>> more flexible than Bash.  Since it is interactive and interpreted, it
>> can easily be used in a "trial and error" style that lets you see what
>> is happening (and what is going wrong).
> 
>     Would it be good for scripts?
> 

Yes.

Python is used for scripts, and for big applications.  It is a very
flexible and popular language.  Personally, I use it for most of my PC
and server programming, with C mainly for embedded systems.

[toc] | [prev] | [next] | [standalone]


#6975

From"Bill Cunningham" <nospam@nspam.invalid>
Date2016-10-17 12:42 -0400
Message-ID<nu2v0d$m0s$1@dont-email.me>
In reply to#6974
"David Brown" <david.brown@hesbynett.no> wrote in message 
news:nu2qn9$4e8$2@dont-email.me...
> On 17/10/16 17:17, Bill Cunningham wrote:
>> "David Brown" <david.brown@hesbynett.no> wrote in message
>> news:nu254e$lsv$1@dont-email.me...
>>
>> ...
>>> Try Python.  It will be simpler and clearer than C, C++ or Perl, and far
>>> more flexible than Bash.  Since it is interactive and interpreted, it
>>> can easily be used in a "trial and error" style that lets you see what
>>> is happening (and what is going wrong).
>>
>>     Would it be good for scripts?
>>
>
> Yes.
>
> Python is used for scripts, and for big applications.  It is a very
> flexible and popular language.  Personally, I use it for most of my PC
> and server programming, with C mainly for embedded systems.
>

    OK I see theres a 3.5.2 and a 2.x.x version. Or version 2. Should I go 
ahead and look at 3? THis would be better than Java too then right?

Bill

[toc] | [prev] | [next] | [standalone]


#6976

FromDavid Brown <david.brown@hesbynett.no>
Date2016-10-17 22:50 +0200
Message-ID<nu3dik$e8f$1@dont-email.me>
In reply to#6975
On 17/10/16 18:42, Bill Cunningham wrote:
> "David Brown" <david.brown@hesbynett.no> wrote in message
> news:nu2qn9$4e8$2@dont-email.me...
>> On 17/10/16 17:17, Bill Cunningham wrote:
>>> "David Brown" <david.brown@hesbynett.no> wrote in message
>>> news:nu254e$lsv$1@dont-email.me...
>>>
>>> ...
>>>> Try Python.  It will be simpler and clearer than C, C++ or Perl, and far
>>>> more flexible than Bash.  Since it is interactive and interpreted, it
>>>> can easily be used in a "trial and error" style that lets you see what
>>>> is happening (and what is going wrong).
>>>
>>>      Would it be good for scripts?
>>>
>>
>> Yes.
>>
>> Python is used for scripts, and for big applications.  It is a very
>> flexible and popular language.  Personally, I use it for most of my PC
>> and server programming, with C mainly for embedded systems.
>>
>
>      OK I see theres a 3.5.2 and a 2.x.x version. Or version 2. Should I go
> ahead and look at 3? THis would be better than Java too then right?
>

You might as well start with Python 3, since you are new to it.  But be 
aware that there is a lot of code around (and tutorials, books, etc.) 
that is Python 2.  For most purposes, Python 2 and 3 are compatible but 
there are a few key points.  In particular, "print" in Python 2 is a 
special statement - you can write "print 1 + 2".  In Python 3, "print" 
is a function - you write "print(1 + 2)".  Conveniently, the second form 
works fine in both versions.

IMHO, Python is "better" than Java for many uses - including your usage. 
  But "better" depends on what you are doing with the language.  Still, 
my advice stands - of all the languages I am familiar with, Python seems 
to me the best for you to learn here.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web