Quote:Original post by Etnu
It's more "english like to say"
if(TheNumberOfThings == 5)
Personally, I like Pascal's approach (using := for assignment).
[blaming target=c++][flaming][flaming][flaming]
I'm too. Also i think C and C++ have _pretty_bad_language_design_. <> for template parameters, = that returns a value,== , << and >> used on streams. Tonns Of Crap.
I can use C++ as well as pascal and detect == typos, but every time i'm checking for typos it reminds me that in our world, only complete crap may become popular.
Also,c/c++ have tonns of buggy RTL functions(like printf),etc. It teachs everyone to use dirty hacks all the way and not check for buffer overflows... In pascal, when you're passing variable-length array as parameter, it's passed together with length,and it's common practice to check length.
Also,most implementations of pascal have their owh memory manager,that is ALOT faster than malloc/free/new/delete (by orders of magnitude). (edit:for ones that don't understand how that may be, for instance,FreePascal's RTL (and Borland Delphi as well) calls system only to allocate big memory blocks (>1MB in size), and uses it's own memory manager to allocate smaller blocks inside heap blocks it gets from system.
"long" strings in FreePascal works faster than bloody null-terminated char* in C (and Pascal's strings are 100% safe), and of course faster than C++'s strings.
[/blaming]
i think it may be useful to write parser/preprocessor that just checks for single = inside () ,and generates an _error_ so you just can't make such error and are forced to do things in other way. And also uses !() for template parameters.