Newbie to Programming

Discussion in 'C++' started by Kato06, Sep 23, 2003.

  1. Kato06

    Jerry Coffin Guest

    [ ... ]
    Comeau implements 'export' for templates. From the viewpoint of the
    front-end, 'export', by itself, consists primarily of putting the
    keyword into the right place in the scanner. To use the keyword
    properly, the front-end also needs to implement two-phase lookup, which
    quite a few (most?) others don't.

    That's a pretty serious amount of hard work, but it's more or less the
    easy part as far as supporting export goes -- once you have a front-end
    that recognizes it correctly, you have to figure out some way to make it
    work. In Comeau's case, a pre-linker is used -- Greg may jump in to
    correct me on this, but I believe this is part of the mechanism used to
    get exported templates to work.

    The basic problem is more or less one of circularity: when you write an
    exported template, the compiler doesn't have _nearly_ all the
    information necessary to generate code for the template. That only
    becomes available when the template is instantiated over some particular
    type. There are a number of problems, but one of the primary ones is
    basically one of circularity: you have to be ready to re-do most of the
    code-generation parts of compiling the template every time it's
    instantiated over a new type.

    Following the typical flow of starting with source files, compiling to
    object files, then linking them together (adding code from libraries as
    needed) simply doesn't fit well with this. You can't compile a template
    to normal object code that's ready for linking until you know the type
    over which its being instantiated.

    In Comeau's case, he does part of the job with a pre-linker that runs
    after the compiler back-end, but before the linker. The details are
    probably proprietary, but I suspect this is used (among other things) to
    take a "compiled" template and generate code for it instantiated over a
    particular type.

    The bottom line is that although there are other compilers that use the
    EDG front-end, TTBOMK, none of them implements export.
     
    Jerry Coffin, Sep 24, 2003
    #21
    1. Advertisements

  2. Kato06

    Big Brian Guest

    Good afternoon all. I'm interested in beginning to learn how to
    Since nobody has mentioned it, I would suggest perl. It's available
    on most OS's, its a very powerful language, and easy to learn.

    I would avoid learning anything that's specific to microsfot windows,
    like Visual basic.
     
    Big Brian, Sep 24, 2003
    #22
    1. Advertisements

  3. Kato06

    Player Guest

    FORGET PERL it's one of the worst syntax's on the planet.
    And avoiding anything Microsoft is some of the dumbest talk I have ever
    heard.
    Don't start your coding life with by jumping on the anti MS Linux bandwagon
    because even though coding for other os's by using languages such as C is
    good talent, the coding languages like VC++ C# J# and VB.NET are the
    languages that will get you the most work if its a career choice, AND will
    give the most satisfaction if your coding simply for personal use.
    Coding is about finding your own alley ways and roads anyways, so don't take
    my advice or indeed anyone's, if your a MS os user then get Visual
    Studio.NET 2003 you wont be disappointed, but if your a Linux user then
    learn C and an interpreted language like Python or TCL but avoid Perl is
    horrible :)
    Player out
     
    Player, Sep 24, 2003
    #23
  4. Kato06

    jeffc Guest

    I think his point was "specific to Windows" - meaning "learn the language,
    not a specific development environment." For example, your skill, not to
    mention your code, will be more portable if you use the STL rather than MFC
    wherever possible. Note all the questions that arise here where the poster
    does not seem to understand the difference between Windows and C++.
     
    jeffc, Sep 24, 2003
    #24
  5. Kato06

    Big Brian Guest

    Good afternoon all. I'm interested in beginning to learn how to
    That's your opinion.

    That's not what I said, read my posting before you get all emotional.
    I said choose something that's NOT SPECIFIC to MS Windows. That is
    very different than saying avoid anything microsoft. You can write
    windows programs in Perl too ( if you had some unknown reason too ).
    Obey this only if you want to fork over money to MS for a crappy OS
    and non standard compiler. Lets see, pay $200 for a microsoft OS (
    that will give the blue screen when running programs by new
    programmers ), $1000 for a Visual Studio .NET, not to mention $300 for
    office tools. Or get Linux for next to nothing, have tools which were
    designed by the entire software community, and never have to reboot
    your computer. It seems clear to me.
    I have found the opposite to be true. Learning skills that are
    portable and standard will get you the most work. Design a project on
    C#, and you're STUCK with microsoft FOREVER.
    Any language will give satisfaction to a new programmer.
    This IS the microsoft way of doing things. March to your own drummer,
    re-invent the wheel and design your own, never confrom to a standard
    so your skills aren't applicable anywhere else.
    Yes, just ignore what you feel is too complicated to understand.
    "Player" may not understand Perl's syntax, but it's a very powerful
    language and can be used over a wide range of domains. And it's free,
    portable, and easy to learn.
     
    Big Brian, Sep 26, 2003
    #25
  6. Kato06

    jeffc Guest

    If it's easy to learn, then why would the syntax be hard to understand?
     
    jeffc, Sep 26, 2003
    #26
  7. Kato06

    Danny Woods Guest

    He didn't say it was hard to understand, just that "Player" may not
    understand it. Perl's syntax is significantly easier to understand than that
    of C++, in my opinion. Sure, regular expressions may look like line noise, and
    some people seem to specialise in writing horribly convoluted one-liners, but
    that doesn't make the language unstructured. I'd expect a C++ programmer to
    appreciate that, given that C++ functions in a number of different paradigms.

    Perl is also more suitable for the newbie, as it won't segfault on you just
    because you did something stupid like write into index 10 of a ten element
    array. Of course, that's not true for everyone: a computer science student
    should be bitten a few times to understand what's going on, but a casual
    programmer probably won't want to suffer hair loss stepping through a debugger.

    Danny.
     
    Danny Woods, Sep 26, 2003
    #27
  8. Kato06

    jeffc Guest

    I didn't say he said it was hard to understand. I asked why it would be
    hard to understand. He's the one who suggested Player was having a hard
    time with the syntax, not Player. I'm wondering why.
     
    jeffc, Sep 26, 2003
    #28
  9. Kato06

    Danny Woods Guest

    Quite possibly because perl has an (in my opinion unfair) reputation for
    being arcane and difficult to learn. This could have something to do with
    the fact that there are so many odd symbols in a typical script. C++/C/Java
    all *look* kind of similar. Perl's appearance is almost completely unique.
    However, once you get past the initial 'ugh!', most people find that it bears
    a strong resemblance to these 'C-style' languages, although it has quite a
    number of 'convenience' features built-in (Larry Wall being something of a
    linguist in his spare time).

    Of course, this doesn't change the fact that most people looking at a perl
    script instinctively run for the hills. Maybe they're the sensible ones... ;-)

    Danny.
     
    Danny Woods, Sep 26, 2003
    #29
  10. avoid Perl is horrible :)
    Try Python (www.python.org), like Perl it's a very powerful language and
    can be used over a wide range of domains, it's free and portable. And,
    unlike Perl, Pythons syntax is elegant and easy to learn and understand
    even if you have never programmed Python before.
     
    Peter van Merkerk, Sep 29, 2003
    #30
  11. How about Brainf**ck? Or Spaghetti?

    :)
    frank
     
    Frank Schmitt, Sep 30, 2003
    #31
  12. Kato06

    Attila Feher Guest

    Look for Robert's Perl Tutorial and you will see that it is possible to
    write readable code in Perl. As it is possible to write unreadable in C or
    C++.
     
    Attila Feher, Sep 30, 2003
    #32
  13. I haven't been so lucky as to look at their syntax, but they certainly
    doesn't *sound* like friendly languages to program in.

    The horrible thing about the whitespace programming language was that it
    was theoretically possible to program in. The significant characters were
    space tab and newline, (that's one more than than the two characters
    available if you were to code directly in binary), and they had actually
    defined syntax and semantics. Don't know if the compiler they provided
    actually worked or was just:

    #include <iostream>
    int main() {
    for(;;) {
    std::cout << "April Fools!" << std::endl;
    }
    }

    See. I managed to get back on topic :)
     
    Nils Petter Vaskinn, Sep 30, 2003
    #33
  14. Kato06

    Chris Dams Guest

    Hello,

    The most beautiful obfuscated programming language is Unlambda.

    Here is hello world:
    `````````````.h.e.l.l.o. .w.o.r.l.d.!ri

    Unlambda rules!

    I once wrote a C++ interpreter for it.

    Bye,
    Chris Dams.
     
    Chris Dams, Sep 30, 2003
    #34
  15. Frank Schmitt, Oct 2, 2003
    #35
  16. Kato06

    Noah Roberts Guest

    Noah Roberts, Oct 2, 2003
    #36
  17. Nils Petter Vaskinn, Oct 2, 2003
    #37
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.