From: Jerry Stuckle on
Andre Kaufmann wrote:
> Mathias Gaunard wrote:
>> On Jul 1, 4:14 pm, n...(a)cam.ac.uk wrote:
>> [...]
>>
>> To me, low-level access with very high abstraction possibilities
>> pretty much means "you can do whatever you want with it".
>
> The same applies to all languages, in some way you can do whatever you
> want. The point is how elegant it is and how much time do I need.
>
> Surely I can travel by car, but will that be faster than by plane ?
> Yes, depends on the car, the streets, traffic - but commonly not.
>
> Some points:
>
> In/with Standard C++ can you:
>
> - Emit code and compile on the fly - C++ scripting ?

Who cares? It's an entirely different model.

> - Can you run it in the browser ?

Who cares? Browsers are not the end of the world.

> - Can you take a function as an argument and parse it's structure?

Who cares? That's not the intent of C++.

> - Can I interchange / directly call code written in other languages
> without writing C wrappers ?

Yes.

> - Can I mix libraries written with different C++ compilers

Can you do this in ANY language?

> - Can I mix C++ code libraries compiled for different platforms

Can you do this in ANY language?

> - Can I write portable GUIs in C++ (e.g. with Qt but, isn't standard)

Can you do this in ANY language?

> - I want to write binary data, e.g. a set of integers.
> How can I do that, that every platform and C++ compiler can read it ?
> (no fixed size types with defined binary layout)

Can you do this in ANY language (except, maybe, Java?). But then, how
important is this?

> - Can I initialize class member objects / values directly where
> they are defined.
>

Who cares? That's what constructors are for.

> In the context of RAII then it would make sense if I
> could simply write
>
> class foo { int m = 88; }
>
>

Nope, that's what constructors are for.

> I can do that all in C++ (in some way), but I can't do it out of the box.
>

Sure. Just the same as any other language.

>>
>> [...]
>
> Andre
>

But virtually everything you want either shows no understanding of the
language itself, or has nothing to do with the language itself.

Sounds like you want Java instead.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(a)attglobal.net
==================

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Mathias Gaunard on
On Jul 3, 1:29 am, Walter Bright <newshou...(a)digitalmars.com> wrote:
> Mathias Gaunard wrote:
> > On Jun 30, 8:51 am, Daniel <danielapar...(a)gmail.com> wrote:
> >> It doesn't do functional well.
> > It does it pretty well, even if C++0x lambdas are disappointing.
>
> Functional programming requires data immutability and function purity.

Nothing prevents you from restricting yourself to a subset of C++
where all data is immutable and all functions pure.

Most languages that people consider functional (Lisp, ML), do allow
side-effects and mutability though.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Mathias Gaunard on
On Jul 2, 9:49 pm, Andre Kaufmann <akfmn...(a)t-online.de> wrote:

> Does it support at least function currying ?

Most lambda DSELs do. Bind also allows a form of currying.


> It would add overhead to the file to add meta data information to do
> reflection appropriately, but not that much to memory - IMHO.

The executable (the file) is mapped into memory in order to run the
program.
How do you think things work?


> >> Using
> >> unicode is painful.
>
> > No programming language does this right anyway.
>
> C# for example has it right out of the box. There are only unicode strings.

It still doesn't do it right in my opinion. Normalization should be an
invariant, for example, and the basic unit should be characters, not
code points.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Dragan Milenkovic on
Le Chaud Lapin wrote:
[snip]
>
> One must ask:
>
> "All other things being equal, what is in the mind of a COBOL-only
> programmer vs. C++-only programmer?"

They both suck for learning only one language. Neither of them can
be even a moderate engineer for the lack of broader view. There is
no need to first invent and then label people.

Learning C++, Java, Python, etc has made me improve in all of those
languages and my OOD skills. Finally, a good engineer needs to learn
a proper design and gets some experience, which needs not come
from learning C++. I mean, have you looked at some C++ code that
people, most likely our coworkers, write? Pure nonsense!

[snip]
> If the answer is "I want to know what's really going on...", then a
> good answer is "C++", because it is very hard to know C++ well and not
> know what's really going on.

Hm... but are you saying that people should walk the hardest path
in order to earn a proper label? If one has the attitude of wanting
"to know what's really going on", one will be much more involved
whatever language chosen. And the path will be much easier and
gains greater if one is open minded and learns many languages.
Hard work vs proper work. "I want to know" == a good engineer.

I will only agree that understanding C++ gives a unique and invaluable
perspective. Notice how I used "understanding" instead of "learning".
You may learn as much as you like, but how will you understand
any concepts other than the ones you use to solve your problems
if not by solving a few problems in Java (maybe doing some EE), Python,
Lisp, Haskel, etc?

--
Dragan

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Daniel on
On Jul 2, 8:29 pm, Walter Bright <newshou...(a)digitalmars.com> wrote:
> Mathias Gaunard wrote:
> > On Jun 30, 8:51 am, Daniel <danielapar...(a)gmail.com> wrote:
> >> It doesn't do functional well.
> > It does it pretty well, even if C++0x lambdas are disappointing.
>
> Functional programming requires data immutability and function purity.
>

I don't think so, "functional" does not mean pure. On the other hand,
ML-style pattern matching is fairly ubiquitous among modern statically-
typed functional languages, C++0x doesn't have that. It doesn't have
garbage collection. It doesn't have higher order functions. It
doesn't have strong typing. And, not unrelated, it doesn't have the
elegence of modern functional languages.

-- Daniel


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]