Newbie to Programming

J

Jerry Coffin

[ ... ]
By Comeau you mean latest EDG frontend based? Or is Comeau some way
different from the others?

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

Big Brian

Good afternoon all. I'm interested in beginning to learn how to
program. The problem is with so many different languages out there
which one should I be considering?? I have no previous programming
experience. Any help or suggestions would be greatly appreciated.

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

Player

Big Brian said:
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.

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
 
J

jeffc

Player said:
And avoiding anything Microsoft is some of the dumbest talk I have ever
heard.

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

Big Brian

Good afternoon all. I'm interested in beginning to learn how to
FORGET PERL it's one of the worst syntax's on the planet.

That's your opinion.

And avoiding anything Microsoft is some of the dumbest talk I have ever
heard.

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 ).
Don't start your coding life with by jumping on the anti MS Linux bandwagon

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

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.
AND will
give the most satisfaction if your coding simply for personal use.

Any language will give satisfaction to a new programmer.
Coding is about finding your own alley ways and roads anyways,

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.
avoid Perl is horrible :)

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

jeffc

Big Brian said:
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.

If it's easy to learn, then why would the syntax be hard to understand?
 
D

Danny Woods

jeffc said:
If it's easy to learn, then why would the syntax be hard to understand?

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

jeffc

Danny Woods said:
He didn't say it was hard to understand, just that "Player" may not
understand it.

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

Danny Woods

jeffc said:
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.

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

Peter van Merkerk

avoid Perl is horrible :)
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.

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

Frank Schmitt

Nils Petter Vaskinn said:
Opinion. And a lot of people would disagree, give me time and I'd find a
syntax that's worse. (eg the Whitespace programming language from April 1)

How about Brainf**ck? Or Spaghetti?

:)
frank
 
A

Attila Feher

Frank said:
How about Brainf**ck? Or Spaghetti?

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

Nils Petter Vaskinn

How about Brainf**ck? Or Spaghetti?

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 :)
 
C

Chris Dams

Hello,

Frank Schmitt said:
How about Brainf**ck? Or Spaghetti?

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

Frank Schmitt

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top