flat assembler
Message board for the users of flat assembler.

Index > Heap > Interesting reading about C++

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
Not sure if it's true, but i had a good laugh and there's lot of truth there.

http://artlung.com/smorgasborg/Invention_of_Cplusplus.shtml

PS: Someone post it to WinASM community / OOP section Twisted Evil
Post 08 Feb 2006, 11:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2468
Location: Bucharest, Romania
Borsuc
nice interview
i thought i was the only one who thinks like that Smile
Post 08 Feb 2006, 11:52
View user's profile Send private message Reply with quote
gunblade



Joined: 19 Feb 2004
Posts: 209
gunblade
Hah, that made me laugh, deffinetly going to give that to a friend of mine who loves C++. Laughing
Is it real though?, since it could easily be faked.

Either way, still good fun to read.
Post 08 Feb 2006, 12:08
View user's profile Send private message Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
That's why i always say: Dump C, use Flat Assembler and Free Pascal!
Post 08 Feb 2006, 12:11
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
Artlav: well, but that's not what he says. Pascal DID have some advantages over C, but it's teaching/mathematic syntax was hell... not talkin about pointers. But C's syntax is also degenerated in some aspects (like function pointers).

FASM is really the most clear usable language i know (until you get into some preprocessing priorities issue Wink but many of them are already made much clearer)
Post 08 Feb 2006, 12:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 959
Location: Czechoslovakia
MazeGen
Ehm, you're trying to compare Pascal, C, C++ and FASM?
Post 08 Feb 2006, 14:44
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
MazeGen: C vs. Pascal vs. FASM - why not? They are "different syntax for same thing". C++ is elsewhere of course
Post 08 Feb 2006, 15:03
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 959
Location: Czechoslovakia
MazeGen
vid: "For same thing"? Try to code some portable project between x86-32 and x86-64 in FASM.

I mean, C, Pascal, FASM, ... are designed for different things, aren't they?
Post 08 Feb 2006, 15:58
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
of course, asm gets some portability issue. But they are all "procedural" languages with same ideology of programming. Unlike object oriented languages, or some logical programming. Programming like C is just like programming in FASM, just with more / less overhead.
Post 08 Feb 2006, 16:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2468
Location: Bucharest, Romania
Borsuc
FASM (assembly in fact) is just more low-level than C and PASCAL. That's why portability is somethin there (though it can be done via macros, since C does nothing special except that it substitutes int with dq instead of dd, and uses 64-bit registers here and there) but portability usually means poor code (especially between very different architectures), because it's more a choice of 'design' in your code, not necessary 'optimization' (i.e algorithms can be designed for 64-bit different than for 32-bit, etc)

However, these languages are procedural, asm is a bit more low-level than them, but you can compare them, unlike C++, which is a Object Oriented language, therefore cannot be compared.

In my opinion, C, PASCAL and FASM can be compared, and C syntax makes somewhat a bit ugly code, not to mention PASCAL where you need begin and end instead of plain end.. too much typing in PASCAL, C is sometimes ugly, FASM has it's flaws sometimes (like the super-nested preprocessor). but I find C and FASM syntaxes clear enough for me.

MazeGen wrote:
I mean C, PASCAL, FASM, .. are designed for different things, aren't they?
Yes, but it's not the different programming ideology behind this designed target
Post 08 Feb 2006, 16:20
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
It's pretty old and it's a fake - but a pretty fun read nonetheless.

Quote:

That's why i always say: Dump C, use Flat Assembler and Free Pascal!

Heh, Pascal instead of C/C++? My oh my. Less lowlevel and flexible, and worse code generators. No thanks Smile
Post 09 Feb 2006, 00:01
View user's profile Send private message Visit poster's website Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
vid wrote:
but it's teaching/mathematic syntax was hell... not talkin about pointers. But C's syntax is also degenerated in some aspects (like function pointers).

Could you please explain, what do you mean by "teaching/mathematic syntax"?
And what's wrong with pointers?


f0dder wrote:

Heh, Pascal instead of C/C++? My oh my. Less lowlevel and flexible, and worse code generators. No thanks Smile

Why less lowlevel and flexible?
Iam not talking about ISO-something pascal standart, i mean object pascal.

Examples please! Just show any examples, where pascal is less usable than C because it's not low-level enough.

About syntax: Short words is recognised as a sort of pictures, allowing quickly "see" the program, bypassing the slowness of words, while C is too comressed - symbols get mixed up, and it takes some efforts to read them properly. That's probably one of the main problem of alot of bugs in C programs.

Not sure about code generator - depends on compiler.
Post 09 Feb 2006, 19:35
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
I guess it's a fake, because if not it would be a real scandal. And it's almost impossible to be true Smile

I found fasm syntax really the best, I code in it the fastest (maybe I just got used).
Post 10 Feb 2006, 16:51
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Yeah, I've read that before, it's pretty fake (sounds like a guy talking to himself). Stroustrup is WAY too smart to waste his time on a fake language. BUT, there is a real language designed for such stupid reasons (as a joke): Intercal.
Post 10 Feb 2006, 19:48
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
artlav: ok, here are some my issues against pascal:
1. often used keyword are long. This is good for teching purposes (it is closer to easy understandable general algorithms, used in math)
2. Try to briefly explain declaration and usage of pointers Twisted Evil
3. unclear if-else matching
4. labels need to be declared
5. string operations by default, they seem too easy to use, but disassembly shows tons of unnescessary overhead caused by simple a:=b;
etc...
Post 13 Feb 2006, 13:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
vid wrote:
... some my issues against pascal:
1. often used keyword are long. This is good for teching purposes (it is closer to easy understandable general algorithms, used in math)
2. Try to briefly explain declaration and usage of pointers Twisted Evil
3. unclear if-else matching
4. labels need to be declared
5. string operations by default, they seem too easy to use, but disassembly shows tons of unnescessary overhead caused by simple a:=b;
etc...
Hmm, I have rarely encountered a more concise explanation of the elegance, beauty, and POWER of Pascal--unquestionably the best programming language (invention of Niklaus Wirth) to date, vastly superior to C or FASM, or anything else, PRECISELY for the reasons you have provided::
no need for pointers, a relic of days when memory was too precious to waste on fixed assignment for only some PARTICULAR array, at a FIXED location.
Declaration of LABELS, wow. What an advantage for debugging!!!
LONG KEYWORDS, GOSH, something READABLE, can it get any better than that????
I love Pascal. It is precisely that collection of attributes, cited above by VID, ostensibly as NEGATIVE attributes, which clearly differentiates PROGRAMMERS from "CODERS", who need not be concerned about READABILITY, or subsequent MODIFIABILITY, and who, virtue of their enormous prowress, NEED NOT BE CONCERNED about such trivia as debugging---CODERS don't make mistakes.
Smile
Post 14 Feb 2006, 01:51
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7520
Location: Kraków, Poland
Tomasz Grysztar
And yes, Pascal has the great educational power. The way I learned assembly language in the first place was by writing inline assembly in the Pascal programs.
Post 14 Feb 2006, 08:41
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
i learnt ASM too via pascal, and i was coding in it for few years

but how can you say that pointers are not needed? Unless you go into OOP you cannot do something more "object" based without them. For example objects in game etc. Also i can't imagine how you can live without things like linked-list.

How would you code "sort" utility (sorts alphabetically lines of input file) without pointers? Declare static array for, let's say 1000 lines? this means on smaller files memory is wasted (ever wondered why new software runs so slow?), and for bigger it will probably throw (?range-check?) error.

How is declaration of labels advantage for debugging? It's disadvantage for readability, but i don't see how can it help debugging.
Post 14 Feb 2006, 10:20
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
Madis731
I've learned assembly from being too tired of writing Machine Language code Very Happy I think this is the best way to learn, but hey - to each his own Wink

P.S. btw, I've just done two programs without linked lists and they work fine. Its all about finding proper algorithms. Its *easier* to do with pointers, but you *can* deal without them Smile Linked lists are too slow for me. I'm using insertion sort on my data because this is what linked list is all about Wink
Post 14 Feb 2006, 12:34
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
Madis: how do you work with unknown number of (any kind of) objects without pointers?
Post 14 Feb 2006, 14:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.