Ok this has been bothering me for a while.. hopefully a few will agree with me on this...
The sentance in question is from the 'dm' help section of DreamMaker:
"The DM (Dream Maker) language uses a syntax similar to C/C++ to build networked multi-user worlds"
Now this is a flat out LIE. Byond's DM scripting language is NOTHING like C/C++. I must think and try hard to find simularities between DM and C (besides the standard mathematical directives). Intead, DM is most definatly a dirivative of PYTHON.
Here are some examples of syntax, in the 3 languages..
Declaration of a variable (integer):
DM: var/MyInt = 35
C: int MyInt;
Python: MyInt = 35;
Structure format:
DM:
proc/Mycommand(whatever):
do whatever
do some more
C:
void MyCommand()
{
dowhatever;
};
Python:
MyCommand(whatever):
dowhatever
dowhatever
Also, DM and python both support auto-conversion of variable types, while C doesn't (C compiler even complains when comparing and operating on variants of the same type! which is understandable of course).
Also, DM's type declaration system is horribly different from C's..
I think the only thing "C-Like" about DM is:
- the (and only the) structure of the for/while/if tags
- The fact that // denotes a comment
Feel free to agree, disagree, elaborate, or flame :)
- Edit
By "horrible" i didn't mean its bad.. its fine, i merely mean to exagerate the difference of the two :)
ID:188837
![]() Dec 25 2003, 10:59 pm (Edited on Dec 25 2003, 11:05 pm)
|
|
the key word is "similar" - if you think that DM has loose typecasting of variables, then it also is similar to PHP in that case.
they don't say that it *is* C-like, just similar to it, which in fact it is similar to C and many other languages that have come before it. |
Which proves that that phrase is completly redundant and is there merely to add power to the language by mere assosiation.. Like microsoft's C#, which is really a version of JAVA afaik
|
well.... ok, i guess you could look at it that way, but i think a more accurate description is that C# is little more than C/C++ with .net bells-and-whistles added to it.
|
I hate Python. Why? It's so darn unreadable. Don't ask me why, I just can't stand looking at Python code. C/C++ code is better, but still not perfect. DM blends the two nicely, I think.
But closer to the topic... this is such a small point to argue. Seriously, who cares? C-like, Python-like, whatever. It's DM. If you want to get really specific, it's not like any other language. Depends on how broad your definition of "like" is. Anyway, it's more C-like like than it is, say, COBOL-like. If it'd said "The DM language uses a syntax similar to COBOL", then I'd query it. But it's close enough to C. And finally... you can *make* DM look more like C by how you choose to lay it out. =) Code like this is perfectly valid in DM: <code>proc/stuff() { Whatever(); OtherStuff(); EvenSemicolonsWork(); }</code> Doesn't look much like Python, does it? Looks more like C/C++ when you do it that way. Granted, most people don't bother with the braces and semicolons, but they can if they want to! |
So you have to add a single backslash to the end of a line... geez... big deal. =P
I never said the syntax was exactly the same, as it clearly isn't. |
Hearing someone describe English as a Germanic language must really give you fits.
... Anyway, you quote the opening line so I won't bother to requote it, but here's what it doesn't say: "DM (Dream Maker) lets you build networked multi-user worlds using C/C++ language" What you're really arguing about here is the meaning of the word "similar" (and possibly the meaning of the word "syntax")... well, here's a word whose meaning I'd like to discuss. "Lie." As in, "Now this is a flat out LIE." So you think the author of this statement have fostered a deliberate untruth? Perhaps Dan and Tom were sitting around going, "How can we sucker users into using our system?" "Well, a lot of people know C or C++. If we tell them that DM is like C/C++, they'll think they already know! MWAHAHAHAHAHA!" "Except... aren't the people who know C/C++ in the best position to tell that it isn't?" "Then we'll say 'similar' and it's all meaningless semantics! It's like the perfect crime!" "Yes... I just hope Captain Dreq, Guardian of Truth and Justice, never catches on... he could expose us in moments." Is that really what you're trying to imply? Not necessarily the melodrama, but that it's a willful and conscious act of deception? I don't think that's what you mean. I -hope- that's not what you mean. Now, they have made a statement of comparison. In your opinion, the comparison is not apt. It is your right to state your opinion, and your right to even come out and say that they're wrong (because that's also your opinion)... labelling it a lie on the basis of your disagreement, though, isn't called for. I disagree with you... other people posting here have shown their disagreement, too... but are we going, "You lie, Dreq, you dirty lying liar!" No. We're simply stating our opinion in opposition to you. Now you might be inclined to come back and say, "But this isn't an opinion... it's a FACT that C++ and DM are different!" Well, yes, it's a fact that there are ways that they're different and it's a fact that there are ways that they're similar, and there's no universal system for weighing the importance of differences and similarities, so it's therefore a matter of opinion whether a comparison between them is apt. If I were describing apples to someone who had never seen any fruit other than oranges, or someone who lived in a region where oranges were the main fruit to be had from trees, I would probably begin by saying, "Apples are a type of food, similar to oranges." People familiar with both types of fruit would be inclined to immediately jump up and say, "Nuh uh! There's hundreds of differences! They're nothing alike!", but for the people I'm trying to reach, I've made an important connection. If I go on to give a detailed description of apples, the audience will see for themselves how and where the apple differs from their more familiar orange... the important thing is that they already have a frame of reference to compare it to. If you try describing the minutest detail of an apple in abstract terms to someone who has no idea that they're hearing a description of the edible fruit of a tree, you could be describing for a loooong time before someone goes, "Hey! This person's talking about fruit!" Frame of reference. Very important. |
Crispy wrote:
I hate Python. Why? It's so darn unreadable. Don't ask me why, I just can't stand looking at Python code. C/C++ code is better, but still not perfect. DM blends the two nicely, I think. I don't get to use Python (yet), being stuck with Perl for various work history reasons. However, I was (I believe) the one who discovered Python on these forums, and after studying it for a bit I posted a summary of similarities and differences...hmm lemme check this in the archives... Damn, that bastard Guy beat me to Python! He mentioned it first (I coulda sworn I'd turned him onto it instead of the reverse...damn archives...). Anyway here is my 2-year old summary of Python and DM: [link] Back to the topic at hand, while people have good points in refuting Dreq, he's actually more or less right. Not about the lying part, of course, but that no one these days would probably call DM "C-like". The key phrase there is "these days". What he's looking at was written quite a while ago, before Python was known by many at all, and Perl was still pretty hard-core. Java may not have been a big deal yet (not sure about that). So at the time, calling it C-like distinguished it, as mentioned by Crispy I think, from COBOL and FORTRAN and Lisp and Unix shell scripting. Were that rewritten today (something that probably should be done not too long from now), no doubt it would focus more on Python and Java and object-oriented Perl than on C/C++. |
Siientx