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


Groups > comp.lang.c++ > #14609 > unrolled thread

C++ vs Pascal

Started byMan-wai Chang <toylet.toylet@gmail.com>
First post2012-02-29 20:02 +0800
Last post2012-02-29 23:50 +0000
Articles 20 on this page of 40 — 16 participants

Back to article view | Back to comp.lang.c++


Contents

  C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-02-29 20:02 +0800
    Re: C++ vs Pascal gwowen <gwowen@gmail.com> - 2012-02-29 04:12 -0800
      Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-02-29 21:15 +0800
        Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-02-29 22:26 +0800
        Re: C++ vs Pascal Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-29 08:42 -0800
          Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-01 01:32 +0800
        Re: C++ vs Pascal Andy Champ <no.way@nospam.invalid> - 2012-02-29 21:48 +0000
          Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 08:02 -0700
            Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 08:04 -0700
      Re: C++ vs Pascal Mike McCarty <mcmccarty@gmail.com> - 2012-02-29 06:26 -0800
        Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-02-29 22:28 +0800
        Re: C++ vs Pascal Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-29 08:49 -0800
          Re: C++ vs Pascal Dombo <dombo@disposable.invalid> - 2012-02-29 19:56 +0100
          Re: C++ vs Pascal Quint Rankid <qbr567@gmail.com> - 2012-02-29 10:31 -0800
            Re: C++ vs Pascal Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-02-29 21:25 +0000
              Re: C++ vs Pascal Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-03-01 05:04 -0800
                Re: C++ vs Pascal gwowen <gwowen@gmail.com> - 2012-03-01 06:29 -0800
                  Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-01 23:07 +0800
                  Re: C++ vs Pascal nick_keighley_nospam@hotmail.com - 2012-03-02 00:27 -0800
            Re: C++ vs Pascal Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-03-01 05:03 -0800
              Re: C++ vs Pascal Mike McCarty <mcmccarty@gmail.com> - 2012-03-01 06:54 -0800
                Re: C++ vs Pascal nick_keighley_nospam@hotmail.com - 2012-03-02 00:41 -0800
                  Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 09:41 -0700
                Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-02 23:24 +0800
                  Re: C++ vs Pascal nick_keighley_nospam@hotmail.com - 2012-03-03 06:40 -0800
                    Re: C++ vs Pascal glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-03-03 20:57 +0000
                      Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 15:19 -0700
                        Re: C++ vs Pascal glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-03-03 22:52 +0000
                          Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 17:12 -0700
              Re: C++ vs Pascal Miles Bader <miles@gnu.org> - 2012-03-02 09:55 +0900
              Re: C++ vs Pascal Rui Maciel <rui.maciel@gmail.com> - 2012-03-02 11:03 +0000
                Re: C++ vs Pascal nick_keighley_nospam@hotmail.com - 2012-03-02 05:01 -0800
            Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 08:56 -0700
      Re: C++ vs Pascal BGB <cr88192@hotmail.com> - 2012-03-03 07:49 -0700
    Re: C++ vs Pascal Quint Rankid <qbr567@gmail.com> - 2012-02-29 10:20 -0800
      Re: C++ vs Pascal Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-01 02:26 +0800
      Re: C++ vs Pascal Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-02-29 21:36 +0000
      Re: C++ vs Pascal "Asger Joergensen" <Junk@Asger-P.dk> - 2012-02-29 23:24 +0000
    Re: C++ vs Pascal Donkey Hottie <donkey@fredriksson.dy.fi> - 2012-03-01 00:02 +0200
      Re: C++ vs Pascal Brian Drummond <brian@shapes.demon.co.uk> - 2012-02-29 23:50 +0000

Page 2 of 2 — ← Prev page 1 [2]


#14653

FromMike McCarty <mcmccarty@gmail.com>
Date2012-03-01 06:54 -0800
Message-ID<6318157.209.1330613690500.JavaMail.geo-discussion-forums@vbhv6>
In reply to#14645
On Thursday, March 1, 2012 7:03:44 AM UTC-6, Nick Keighley wrote:
> I'm-not-starting-a-language-war-but
>      Lisp has:-
>        - unusual syntax
>        - it's a very big langauge
>        - little out-of-the-box support for modern programming (GUIs,
> web, etc.)

Lisp's syntax is not unusual - it's simple.  Extremely simple and intuitive.

Lisp as a basic language is small, very small.  You can teach both the syntax and all of the basic constructs in ~1 hour to a reasonably competent CS student.  Enough to write any algorithm a first-year student is likely to write.  I can't think of another language where that is even theoretically possible.

I'm sort of old-fashioned I suppose, but what does a first-year CS student need with fancy GUIs?  Honestly, they just confuse the issue.  Lisp is an interpreted language so an interpreter prompt is really all you need (okay, a Lisp-aware text editor like emacs would be nice too).

My first college CS course was based on Scheme (a LISP variant).  At the time I thought it was odd, but now I consider it an ideal first-year-CS language.  You don't spend time worrying about syntax, IDEs, etc.  You worry about algorithm design and correctness.  As it should be.

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


#14679

Fromnick_keighley_nospam@hotmail.com
Date2012-03-02 00:41 -0800
Message-ID<29116901.444.1330677692604.JavaMail.geo-discussion-forums@vbux23>
In reply to#14653
On Thursday, March 1, 2012 2:54:50 PM UTC, Mike McCarty wrote:
> On Thursday, March 1, 2012 7:03:44 AM UTC-6, Nick Keighley wrote:

> > I'm-not-starting-a-language-war-but
> >      Lisp has:-
> >        - unusual syntax
> >        - it's a very big langauge
> >        - little out-of-the-box support for modern programming (GUIs,
> > web, etc.)
> 
> Lisp's syntax is not unusual - it's simple.  Extremely simple and intuitive.

ok it's simple. It's /also/ unusual. One mans "intuitive" is another mans.... But we have fallen into pantomime mode.

> Lisp as a basic language is small, very small. 

Common Lisp may have a very small core but I've never found it particularly easy to identify.

> You can teach both the syntax and all of the basic constructs in ~1 hour to a reasonably competent CS student.  

probably. But then basic C or Pascal or Python wouldn't take too long either.

> Enough to write any algorithm a first-year student is likely to write.  I can't think of another language where that is even theoretically possible.

really? I suspect bit banging is a bit difficult in core Lisp. Knuth had a reason for using pseudo-assembler.

What would be difficult in Pascal or Python?

> I'm sort of old-fashioned I suppose, but what does a first-year CS student need with fancy GUIs? 

engage their interest. real world programming actually has to deal with such things. When I was talking about beginner languages I wasn't necessaily thinking of CS students.

> Honestly, they just confuse the issue.  Lisp is an interpreted language 

no. It *may* be an interpreted langauge. The CL standard actually requires a compiler. Stalin Scheme is one of the more aggressive whole program compilers in existence.

> so an interpreter prompt is really all you need 

never quite got the enthusiasm for interpreters. I've programmed in Python but I've never understood why interpreters are super cool. On modern hardware compilers are pretty quick too.

> (okay, a Lisp-aware text editor like emacs would be nice too).

gak.

> My first college CS course was based on Scheme (a LISP variant). 

I've learned, used and like Scheme.

> At the time I thought it was odd, but now I consider it an ideal first-year-CS language.  You don't spend time worrying about syntax, IDEs, etc.  You worry about algorithm design and correctness.  As it should be.

[the new google interface seems to have duplicated the entire post here  :-( ]

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


#14720

FromBGB <cr88192@hotmail.com>
Date2012-03-03 09:41 -0700
Message-ID<jithmc$fkv$1@news.albasani.net>
In reply to#14679
On 3/2/2012 1:41 AM, nick_keighley_nospam@hotmail.com wrote:
> On Thursday, March 1, 2012 2:54:50 PM UTC, Mike McCarty wrote:
>> On Thursday, March 1, 2012 7:03:44 AM UTC-6, Nick Keighley wrote:
>
>>> I'm-not-starting-a-language-war-but
>>>       Lisp has:-
>>>         - unusual syntax
>>>         - it's a very big langauge
>>>         - little out-of-the-box support for modern programming (GUIs,
>>> web, etc.)
>>
>> Lisp's syntax is not unusual - it's simple.  Extremely simple and intuitive.
>
> ok it's simple. It's /also/ unusual. One mans "intuitive" is another mans.... But we have fallen into pantomime mode.
>

hence, why although I did implement a Scheme variant at one point, my 
next major language (implemented not long after), switched to a 
JavaScript based syntax...

my current language is arguably a direct descendant though, although 
there have been a number of changes over the years (some syntax, mostly 
semantic).


>> Lisp as a basic language is small, very small.
>
> Common Lisp may have a very small core but I've never found it particularly easy to identify.
>
>> You can teach both the syntax and all of the basic constructs in ~1 hour to a reasonably competent CS student.
>
> probably. But then basic C or Pascal or Python wouldn't take too long either.
>

yeah, and also most people showing up aren't exactly "blank slates" either.


>> Enough to write any algorithm a first-year student is likely to write.  I can't think of another language where that is even theoretically possible.
>
> really? I suspect bit banging is a bit difficult in core Lisp. Knuth had a reason for using pseudo-assembler.
>
> What would be difficult in Pascal or Python?
>
>> I'm sort of old-fashioned I suppose, but what does a first-year CS student need with fancy GUIs?
>
> engage their interest. real world programming actually has to deal with such things. When I was talking about beginner languages I wasn't necessaily thinking of CS students.
>

yep.

although I don't necessarily entirely like "real world" based arguments 
(which often boil down to "it is a dog-eat-dog world where people need 
mountains of money to survive" or "it is a waste of time for programmers 
to actually do anything or actually write code" or whatever), things 
don't really exist in a vacuum either, and "what is the case?" and "how 
can this be useful?" are fairly important.

so, yes, people may need to think about things like:
how easily can I do typical file IO task?
how easily can I access sockets?
how easily can I throw together a basic GUI?
...

kind of hard to pass off a language which does poorly in these areas 
(among others).


>> Honestly, they just confuse the issue.  Lisp is an interpreted language
>
> no. It *may* be an interpreted langauge. The CL standard actually requires a compiler. Stalin Scheme is one of the more aggressive whole program compilers in existence.
>

yep.

>> so an interpreter prompt is really all you need
>
> never quite got the enthusiasm for interpreters. I've programmed in Python but I've never understood why interpreters are super cool. On modern hardware compilers are pretty quick too.
>

well, it depends on how one draws the line.

as I see it, they aren't really exclusive, as one can have an evaluation 
prompt and compile most things to native code easily enough.

for dynamic loading or interactive entry, short of having to include a 
mountain of headers (one of several major killers for my "C as a 
script-language effort"), one can actually compile things fairly quickly 
(and get much better overall performance than with a plain interpreter).


a scripting language with a vaguely C-like syntax and a fairly strong C 
FFI is "close enough" to being interactive entry of C.

likewise, given the headers are compiled to databases and loaded in 
advance, it also avoids the huge delay of having to drag in a bunch of 
stuff from headers in order to compile stuff (the compiler/VM may 
instead simply retrieve the parts it needs).


I tested, and even running my VM from Linux/ARM, running inside QEMU, 
running on Linux x86-64, running inside VMware, running on Windows 7, 
the VM was still fairly quick and responsive (despite an apparently > 
1000x slowdown, invoking GCC within the emulator, to compile pretty much 
anything, took a *long* time...).


granted, I probably one of the few people who cares how quickly "eval" 
runs, for sake of wanting to use it for some tasks in a soft real-time 
3D engine type scenario (it need not just be fast enough for interactive 
use, but also fast enough so that it can be used for things like world 
event triggers and so on, without adversely impacting gameplay).

yes, yes, maybe "eval" isn't really "the right tool for the job", but 
whatever...


>> (okay, a Lisp-aware text editor like emacs would be nice too).
>
> gak.
>

agreed, I am not fond of emacs...


>> My first college CS course was based on Scheme (a LISP variant).
>
> I've learned, used and like Scheme.
>

I liked Scheme, and even in my newer efforts, it isn't entirely dead 
(even if given my language designs, people are prone to make accusations 
of "blub" and whatever...).


>> At the time I thought it was odd, but now I consider it an ideal first-year-CS language.  You don't spend time worrying about syntax, IDEs, etc.  You worry about algorithm design and correctness.  As it should be.
>
> [the new google interface seems to have duplicated the entire post here  :-( ]

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


#14692

FromMan-wai Chang <toylet.toylet@gmail.com>
Date2012-03-02 23:24 +0800
Message-ID<jiqonr$rhe$1@dont-email.me>
In reply to#14653
> Lisp's syntax is not unusual - it's simple.  Extremely simple and intuitive.

I used Golden Common LISP and PROLOG. Their main selling point are 
recursion. It would be a nightmare to code procedural codes.

> Lisp as a basic language is small, very small.  You can teach both the syntax
 > and all of the basic constructs in ~1 hour to a reasonably
 > competent CS student.  Enough to write any algorithm a first-year
 > student is likely to write.  I can't think of another language
 > where that is even theoretically possible.

Give us user-interface objects and database functions first for a 
programming language to be really useful. :)

-- 
   @~@   You have the right to remain silence.
  / v \  Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (Fedora 15 i686)  Linux 3.2.6
   ^ ^   23:18:01 up 7 days 10:15 0 users load average: 0.00 0.01 0.05
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa

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


#14712

Fromnick_keighley_nospam@hotmail.com
Date2012-03-03 06:40 -0800
Message-ID<27682116.711.1330785643599.JavaMail.geo-discussion-forums@vbkc1>
In reply to#14692
On Friday, March 2, 2012 3:24:40 PM UTC, Man-wai Chang wrote:
> > Lisp's syntax is not unusual - it's simple.  Extremely simple and intuitive.
> 
> I used Golden Common LISP and PROLOG. Their main selling point are 
> recursion. It would be a nightmare to code procedural codes.

C, C++, Python, Perl all support recursion. What language doesn't? Some older BASICs?

<snip>

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


#14727

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2012-03-03 20:57 +0000
Message-ID<jiu0is$jte$1@speranza.aioe.org>
In reply to#14712
nick_keighley_nospam@hotmail.com wrote:

(snip, someone wrote)

>> I used Golden Common LISP and PROLOG. Their main selling point 
>> are recursion. It would be a nightmare to code procedural codes.

> C, C++, Python, Perl all support recursion. What language doesn't? 
> Some older BASICs?

Even the BASIC GOSUB should allow for recursion. 

Fortran added it in Fortran 90.

But even though those allow for it, many problems are easier
to write, and run faster, without using recursive calls.

Factorial and Fibonacci are two favorite examples of recursion
that, especially the latter, should be done without recursion.

Quicksort can be written simply with recursion, but not all
that much harder without it.

-- glen

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


#14728

FromBGB <cr88192@hotmail.com>
Date2012-03-03 15:19 -0700
Message-ID<jiu5fq$tfs$1@news.albasani.net>
In reply to#14727
On 3/3/2012 1:57 PM, glen herrmannsfeldt wrote:
> nick_keighley_nospam@hotmail.com wrote:
>
> (snip, someone wrote)
>
>>> I used Golden Common LISP and PROLOG. Their main selling point
>>> are recursion. It would be a nightmare to code procedural codes.
>
>> C, C++, Python, Perl all support recursion. What language doesn't?
>> Some older BASICs?
>
> Even the BASIC GOSUB should allow for recursion.
>
> Fortran added it in Fortran 90.
>
> But even though those allow for it, many problems are easier
> to write, and run faster, without using recursive calls.
>
> Factorial and Fibonacci are two favorite examples of recursion
> that, especially the latter, should be done without recursion.
>

but, the recursive Fibonacci function makes such a great benchmark...

why not have an algo where one can be like "fib(38)" or "fib(42)" and 
measure how long it takes to complete?

granted, yes, one can have recursive selection-sort or similar, but it 
is more complicated and doesn't have nearly as much time complexity.

otherwise, one can use bubble-sort of giant arrays, which, likewise, 
requires allocating storage space for said array.


> Quicksort can be written simply with recursion, but not all
> that much harder without it.
>

yep.

> -- glen

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


#14729

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2012-03-03 22:52 +0000
Message-ID<jiu7au$62f$1@speranza.aioe.org>
In reply to#14728
BGB <cr88192@hotmail.com> wrote:

(snip, I wrote)
>> Factorial and Fibonacci are two favorite examples of recursion
>> that, especially the latter, should be done without recursion.

> but, the recursive Fibonacci function makes such a great benchmark...

> why not have an algo where one can be like "fib(38)" or "fib(42)" and 
> measure how long it takes to complete?

I suppose it is a good benchmark for function call overhead, 
but not much else. Maybe also a test for tail recursion optimization,
but there should be better tests for that. (It isn't so bad if
you include a cache of previously computed values.)

-- glen

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


#14730

FromBGB <cr88192@hotmail.com>
Date2012-03-03 17:12 -0700
Message-ID<jiuc41$am3$1@news.albasani.net>
In reply to#14729
On 3/3/2012 3:52 PM, glen herrmannsfeldt wrote:
> BGB<cr88192@hotmail.com>  wrote:
>
> (snip, I wrote)
>>> Factorial and Fibonacci are two favorite examples of recursion
>>> that, especially the latter, should be done without recursion.
>
>> but, the recursive Fibonacci function makes such a great benchmark...
>
>> why not have an algo where one can be like "fib(38)" or "fib(42)" and
>> measure how long it takes to complete?
>
> I suppose it is a good benchmark for function call overhead,
> but not much else. Maybe also a test for tail recursion optimization,
> but there should be better tests for that. (It isn't so bad if
> you include a cache of previously computed values.)
>

it depends on what is being measured.
if it is a dynamic language, it may also put a strain on things like 
type-checking, accessing local variables and arguments, and performing 
basic arithmetic.

in an interpreter, there is also the instruction dispatch overhead, ...

one can also alter it to perform other side operations in which to 
benchmark, ... (like, a variant which does string operations or vector 
arithmetic or similar).


or such...


> -- glen

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


#14668

FromMiles Bader <miles@gnu.org>
Date2012-03-02 09:55 +0900
Message-ID<874nu74y9a.fsf@catnip.gol.com>
In reply to#14645
Nick Keighley <nick_keighley_nospam@hotmail.com> writes:
> I'm-not-starting-a-language-war-but
>      Lisp has:-
...
>        - it's a very big langauge

Wait, this is being used as a defense of _python_?   *boggle*

-miles

-- 
Is it true that nothing can be known?  If so how do we know this?  -Woody Allen

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


#14685

FromRui Maciel <rui.maciel@gmail.com>
Date2012-03-02 11:03 +0000
Message-ID<jiq9dv$ofd$1@speranza.aioe.org>
In reply to#14645
Nick Keighley wrote:

> I'm-not-starting-a-language-war-but
> Lisp has:-
> - unusual syntax

Every programming language has an unusual syntax to those who never had any 
contact with it. 


> - it's a very big langauge

Then there is Scheme.


> - little out-of-the-box support for modern programming (GUIs,
> web, etc.)

I believe there are some lisp bindings for some GUI toolkits.  And there are 
some CGI interfaces for Lisp floating around.

http://en.wikipedia.org/wiki/Mod_lisp
http://www.clisp.org/impnotes/fastcgi.html

I never used any of them, though.


Rui Maciel

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


#14687

Fromnick_keighley_nospam@hotmail.com
Date2012-03-02 05:01 -0800
Message-ID<4696222.26.1330693276142.JavaMail.geo-discussion-forums@vbfl9>
In reply to#14685
On Friday, March 2, 2012 11:03:28 AM UTC, Rui Maciel wrote:
> Nick Keighley wrote:
> 
> > I'm-not-starting-a-language-war-but
> > Lisp has:-
> > - unusual syntax
> 
> Every programming language has an unusual syntax to those who never had any 
> contact with it. 

I can program in a Lispy language (scheme).

Ada, Pascal, C, C++, Java, C#, Python

all have pretty similar syntax. Lisp doesn't. But this becomes tedious.

> > - it's a very big langauge
> 
> Then there is Scheme.

I was assuming "Lisp" meant Common Lisp. Standard Scheme is indeed tiny.

> > - little out-of-the-box support for modern programming (GUIs,
> > web, etc.)
> 
> I believe there are some lisp bindings for some GUI toolkits.  And there are 
> some CGI interfaces for Lisp floating around.

that's my point. "floating around" doesn't really cut it.

> http://en.wikipedia.org/wiki/Mod_lisp
> http://www.clisp.org/impnotes/fastcgi.html
> 
> I never used any of them, though.

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


#14719

FromBGB <cr88192@hotmail.com>
Date2012-03-03 08:56 -0700
Message-ID<jitf2l$9qk$1@news.albasani.net>
In reply to#14622
On 2/29/2012 11:31 AM, Quint Rankid wrote:
> On Feb 29, 11:49 am, Nick Keighley<nick_keighley_nos...@hotmail.com>
> wrote:
>
>> indeed. I'd point people at Python for a beginners language now,
>> though part of me thinks Strong Typeing would be good for 'em.
>
> Maybe some other things would be good for them too.
> http://www.codingthewheel.com/game-dev/john-carmack-script-interpreters-considered-harmful
>
> I'm not trying to start a language flame war, honestly. I'll let this
> guy do it for me. ;) http://xkcd.com/353/
>
> Python has some interesting features, but I tend to think that some of
> that might be difficult for beginners.  For example, I agree with you
> that strong typing is a good thing.
>
> If Python is "good", whatever that means, then why isn't Lisp,
> "better"? http://xkcd.com/224/
>

ironically, Carmack is a bit of a personal influence of mine (and I had 
learned a fair amount from his code over the years).


I also implement scripting VMs, and have my own scripting language.

the thing is arguably a bit "heavy" by scripting-language terms (in 
terms of language and VM complexity), as it is mostly AS3 like at 
present (similar syntax, ECMAScript-based, with importing/packages, 
optional classes and type-annotations / static-types, in addition to 
Prototype OO and dynamic types, ...).

it also incorporates some concepts from C and C++ as well (namely: 
optional pointer-based types, pass-by-value classes / "value classes", 
and RAII, ...). it isn't perfect though (the pointers are internally 
represented as boxed objects, ...).

it started out closer to a straight mix of JavaScript, Scheme, and Self, 
but over time began incorporating ideas from Java, AS3, C#, C, ... into 
the design.

this wasn't strictly for performance reasons, but more often for 
"scalability" reasons, as what works well with a small amount of code 
isn't necessarily good with a bit more code.

another major issue was trying to make the C FFI reasonably good, and a 
good way to help here is to lessen the borders between the Script VM and 
the native C code (it is a lot easier to share data when ones' VM is all 
like "yeah, I understand structs and pointers..."). this is mostly 
because I don't particularly like writing boilerplate.


performance isn't really great (vs C or C++), but is mostly tolerable 
for most stuff (albeit most "heavy lifting" is done in C and C++, script 
code is mostly for "misc" stuff).

I had recently done a little fiddling with writing a new JIT for the 
thing though (as-is, currently execution is mostly built on a mix of 
threaded code with some limited/fragmentary native code-generation).

threaded code is a bit faster than a naive "big switch()" interpreter 
(where the interpreter is a loop feeding opcodes into a giant "switch()" 
block), but "it could still be a bit faster".

granted, in my case, the video card still seems to be a much bigger 
bottleneck than the scripting VM's performance, hence why speeding it up 
hasn't been a huge priority.


or such...

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


#14715

FromBGB <cr88192@hotmail.com>
Date2012-03-03 07:49 -0700
Message-ID<jitb4k$1ol$1@news.albasani.net>
In reply to#14610
On 2/29/2012 5:12 AM, gwowen wrote:
> On Feb 29, 12:02 pm, Man-wai Chang<toylet.toy...@gmail.com>  wrote:
>> Are schools and universities in the States still teaching Pascal?
>
> I'm sure some still are.
>
>> Isn't C++ as good as Pascal?
>
> As a first language for didactic purposes?  I think C, C++ and Java
> are all equally lousy.  Pascal is distinctly better, Python better
> again.  YMMV

being most of the way through college as a CS major, I have seen the 
following taught in classes:
C, C++, ASM, Java, VB.NET, and C#.

observation:
students appear to have an easier time with Java, C#, and VB.NET, than 
they do with C, C++, and ASM.

the VB class was IMO kind of a joke, as the book and assignments were 
basically a bunch of screen-shots (of Visual Studio) with arrows (click 
here, drag this there, type in this code fragment there, ...). sometimes 
with brief side-notes and explanations between the screen-shots (extreme 
critical thinking this is...).


most of the General-Education classes are considerably much harder.

as for myself, I started at first, long ago, with BASIC, then learned C 
and ASM, and learned other stuff from there (but mostly use C and some 
C++ and ASM). have messed with Java and C#, but never really gotten into 
them (neither really offers much personally in my main areas).


I personally dislike Python, finding it in most ways to be rather hideous.

I have my own projects, and my own custom scripting language (ECMAScript 
based), though...


or such...

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


#14619

FromQuint Rankid <qbr567@gmail.com>
Date2012-02-29 10:20 -0800
Message-ID<c2f3c810-682c-41de-b884-4745d8e72c47@v2g2000vbx.googlegroups.com>
In reply to#14609
On Feb 29, 7:02 am, Man-wai Chang <toylet.toy...@gmail.com> wrote:
> Are schools and universities in the States still teaching Pascal?

I don't know, but a visit here http://groups.google.com/group/comp.lang.pascal/topics?hl=en
where the last post is dated from 2004, suggests that it probably is
not taught, or at least not very much.  If it were taught there would
probably be more posts from students asking for help.  Although usenet
is losing popularity.  Posts that pop up after a search for pascal at
www.stackoverflow.com suggest that Delphi is being used more.
>
> Isn't C++ as good as Pascal?

I suppose it depends on how you define "good".

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


#14620

FromMan-wai Chang <toylet.toylet@gmail.com>
Date2012-03-01 02:26 +0800
Message-ID<jilqlb$u7c$1@dont-email.me>
In reply to#14619
>> Isn't C++ as good as Pascal?
>
> I suppose it depends on how you define "good".

As good and simple as dBase/Clipper/Foxpro? :)

-- 
   @~@   You have the right to remain silence.
  / v \  Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (Fedora 15 i686)  Linux 3.2.6
   ^ ^   02:24:01 up 5 days 13:21 0 users load average: 0.00 0.01 0.05
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa

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


#14625

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-02-29 21:36 +0000
Message-ID<slrnjkt6ib.1ls.grahn+nntp@frailea.sa.invalid>
In reply to#14619
On Wed, 2012-02-29, Quint Rankid wrote:
> On Feb 29, 7:02 am, Man-wai Chang <toylet.toy...@gmail.com> wrote:
>> Are schools and universities in the States still teaching Pascal?
>
> I don't know, but a visit here http://groups.google.com/group/comp.lang.pascal/topics?hl=en
> where the last post is dated from 2004, suggests that it probably is
> not taught, or at least not very much.

There is no comp.lang.pascal on my news server. There are a handful of
comp.lang.pascal.*, so it was probably split in the early 1990s.
Google has probably picked up an obsolete group, so it's no surprise
it's empty.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

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


#14632

From"Asger Joergensen" <Junk@Asger-P.dk>
Date2012-02-29 23:24 +0000
Message-ID<xn0hv2a69ain05500m@news.astraweb.com>
In reply to#14619
Hi Quint

Quint Rankid wrote:

> On Feb 29, 7:02 am, Man-wai Chang <toylet.toy...@gmail.com> wrote:
> > Are schools and universities in the States still teaching Pascal?
> 
> I don't know, but a visit here http://groups.google.com/group/comp.lang.pascal/topics?hl=en
> where the last post is dated from 2004, suggests that it probably is
> not taught, or at least not very much.  If it were taught there would
> probably be more posts from students asking for help.  Although usenet
> is losing popularity.  Posts that pop up after a search for pascal at
> www.stackoverflow.com suggest that Delphi is being used more.

I think its more or less the only Pascal there is used now and it have
a lot of users and a thriving community:

https://forums.embarcadero.com/category.jspa?categoryID=12

Spoke to soon I just came to think about Free Pascal the last stable
release of that compiler is dated:  January 1, 2012; 57 days ago, on wiki
and it supports all major platforms, so I guess somebody must be using it.

Best regards
Asger-P

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


#14627

FromDonkey Hottie <donkey@fredriksson.dy.fi>
Date2012-03-01 00:02 +0200
Message-ID<osj229-482.ln1@hurricane.fredriksson.dy.fi>
In reply to#14609
29.2.2012 14:02, Man-wai Chang kirjoitti:
> 
> Are schools and universities in the States still teaching Pascal?
> 
> Isn't C++ as good as Pascal?
> 

"Standard" Pascal is not much. Microsoft had Pascal, and it was strange
with all thos QQ.. names in it. It died.

Pacal has evolved. Object Pascal as in Delphi and others is quite good.
I think Java learned much about Borland about language and library.

Ada was maybe the next generation of Pascal, but it is quite huge, and
it's golder era is in history. It never really took right with Objects
and OO. It is said to be OP, not OO. Ada still lives in Oracle offerings
as a subset called PL/SQL.

I have done coding in Delphi, and PL/SQL. I really enjoyded those times.

Pascal was the second language for me, right after Basic. I never
understood its complexities like pointers. Only after learning and using
C programming language with its measly 28 keywords I understood
pointers, and Pascal finally.

I have not much coded in C, maybe 1 major project. Somewhere in -92 I
switched to C++ and wrote own portable class library, which I used with
great success next 10 years. I also made couple of projects with Delphi
1.0, and I enjoed the tool(s). The products were quiet succesful too.

Nowadays I do mostly Java EE only. Also some C# when integrating Java
based WebServices with .Net.

-- 

Chicken Little was right.

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


#14633

FromBrian Drummond <brian@shapes.demon.co.uk>
Date2012-02-29 23:50 +0000
Message-ID<jimdjo$sm0$2@dont-email.me>
In reply to#14627
On Thu, 01 Mar 2012 00:02:32 +0200, Donkey Hottie wrote:

> 29.2.2012 14:02, Man-wai Chang kirjoitti:
>> 
>> Are schools and universities in the States still teaching Pascal?
>> 
>> Isn't C++ as good as Pascal?
>> 
>> 
> "Standard" Pascal is not much. Microsoft had Pascal, and it was strange
> with all thos QQ.. names in it. It died.
> 
> Pacal has evolved. Object Pascal as in Delphi and others is quite good.
> I think Java learned much about Borland about language and library.
> 
> Ada was maybe the next generation of Pascal, but it is quite huge, and
> it's golder era is in history. It never really took right with Objects
> and OO. It is said to be OP, not OO. Ada still lives in Oracle offerings
> as a subset called PL/SQL.

Incorrect on several points. Ada is huge compared with Pascal, but fairly 
small, clean and simple compared with C++. Since 1995 it has been as 
fully object-oriented as C++ can claim to be, though you may have been 
thinking of the 1983 dialect which (as you say) never took right with 
objects. The 2005 dialect allows more familiar-looking expression of OO 
programming (object.method notation) and so on. 

Most rational objections to Ada are based in the 1980s - an Ada compiler 
can bring a 1980's workstation to its knees, and who needs things like 
multi-tasking at the language level, it's not like there are any multi-
core CPUs around (except the 370) right? And Ada compilers are too 
expensive...

Now that any self-respecting build of gcc includes Ada, things are a bit 
different.

As to when its golden age was, is, or will be, it's probably too soon to 
say.

- Brian

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c++


csiph-web