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


Groups > comp.lang.c++ > #14719

Re: C++ vs Pascal

From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: C++ vs Pascal
Date 2012-03-03 08:56 -0700
Organization albasani.net
Message-ID <jitf2l$9qk$1@news.albasani.net> (permalink)
References <jil45d$h3a$2@dont-email.me> <d7422e87-527a-42bf-9cff-cd921cfbf4c7@k6g2000vbz.googlegroups.com> <6350040.459.1330525579851.JavaMail.geo-discussion-forums@vbkc1> <ac8dc22f-231d-4616-b2dd-46e38a7a8da7@ge5g2000vbb.googlegroups.com> <c85dec11-1fe3-4d5d-868d-340ab2f889f4@s7g2000vby.googlegroups.com>

Show all headers | View raw


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...

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web